User:Lindenb/Notebook/UMR915/20100616

From OpenWetWare

Jump to: navigation, search

20100615        Top        20100617       


Contents

Downloading Resources for GATK

 mkdir -p /GENOTYPAGE/data/pubdb/broad.mit.edu/gsa
 cd /GENOTYPAGE/data/pubdb/broad.mit.edu/gsa
 export ftp_proxy=###########
 wget ftp://ftp.broad.mit.edu/pub/gsa/gatk_resources.tgz
 tar xvfz gatk_resources.tgz
 
 resources/
 resources/dbsnp_130_b37.rod
 resources/Homo_sapiens_assembly18.fasta
 resources/human_g1k_v37.dict
 resources/human_b36_both.fasta
 resources/human_g1k_v37.fasta
 resources/dbsnp_130_b36.rod
 resources/dbsnp_129_hg18.rod
 resources/dbsnp_129_b36.rod
 resources/human_b36_both.dict
 resources/Homo_sapiens_assembly18.fasta.fai
 resources/Homo_sapiens_assembly18.dict
 resources/human_g1k_v37.fasta.fai
 resources/human_b36_both.fasta.fai
 resources/dbsnp_130_hg18.rod
 
 rm gatk_resources.tgz

GATK -T CountCovariates requires that the BAM was indexed.

CountCovariates

as defined at http://www.broadinstitute.org/gsa/wiki/index.php/Base_quality_score_recalibration first test with

 java -Xmx4g -jar /usr/local/package/gatk/GenomeAnalysisTK-1.0.3471/GenomeAnalysisTK.jar \
    -l INFO -R /GENOTYPAGE/data/pubdb/broad.mit.edu/gsa/resources/Homo_sapiens_assembly18.fasta \
    --DBSNP /GENOTYPAGE/data/pubdb/broad.mit.edu/gsa/resources/dbsnp_129_hg18.rod \
    -I bwa_rmdup_XXXXXXXXXXXXXX.bam  \
    -T CountCovariates \
    -cov ReadGroupCovariate \
    -cov QualityScoreCovariate \
    -cov CycleCovariate \
    -cov DinucCovariate \
    -recalFile my_reads.recal_data.csv \
    --default_platform illumina

content of my_read.recal_data.csv

 # Counted Sites    960945769
 # Counted Bases    8925331332
 # Skipped Sites    3899696
 # Fraction Skipped 1 / 246 bp
 ReadGroup,QualityScore,Cycle,Dinuc,nObservations,nMismatches,Qempirical
 bwa_rmdup_XXXXX.bam,2,-54,AA,254,143,2
 bwa_rmdup_XXXXX.bam,2,-54,AC,111,40,4
 bwa_rmdup_XXXXX.bam,2,-54,AG,91,39,4
 bwa_rmdup_XXXXX.bam,2,-54,AT,118,36,5
 bwa_rmdup_XXXXX.bam,2,-54,CA,289,11,14
 bwa_rmdup_XXXXX.bam,2,-54,CC,696,642,1
 bwa_rmdup_XXXXX.bam,2,-54,CG,100,24,6
 (...)

TableRecalibration

option -nt (num thread) doesn't work here.

 java -Xmx4g -jar /usr/local/package/gatk/GenomeAnalysisTK-1.0.3471/GenomeAnalysisTK.jar \
    -l INFO \
    -R  /GENOTYPAGE/data/pubdb/broad.mit.edu/gsa/resources/Homo_sapiens_assembly18.fasta \
    -I bwa_rmdup_XXXX.bam \
    -T TableRecalibration \
    -outputBam jeter.bam \
    -recalFile my_reads.recal_data.csv \
    --default_platform illumina

Mysql

yum install mysql-server.x86_64
mkdir -p /GENOTYPAGE/data/mysql/datadir

current content of /etc/my.cnf is

 [mysqld]
 datadir=/var/lib/mysql
 socket=/var/lib/mysql/mysql.sock
 user=mysql
 # Default to using old password format for compatibility with mysql 3.x
 # clients (those using the mysqlclient10 compatibility package).
 old_passwords=1
 
 # Disabling symbolic-links is recommended to prevent assorted security risks;
 # to do so, uncomment this line:
 # symbolic-links=0
 
 [mysqld_safe]
 log-error=/var/log/mysqld.log
 pid-file=/var/run/mysqld/mysqld.pid

permission for /var/lib/mysql

 ls -la /var/lib/mysql
 total 12
 drwxr-xr-x  2 mysql mysql 4096 mai 20 16:24 .

changing permissions:

 cd /GENOTYPAGE/data/mysql
 chown mysql:mysql datadir
 ls -la
 total 12
 drwxr-xr-x 3 root  root  4096 jun 16 11:29 .
 drwxr-xr-x 6 root  root  4096 jun 16 11:29 ..
 drwxr-xr-x 2 mysql mysql 4096 jun 16 11:29 datadir

editing datadir in /etc/my.cnf

 #datadir=/var/lib/mysql
 datadir=/GENOTYPAGE/data/mysql/datadir

starting mysql

 /etc/init.d/mysqld start
 Initialisation de la base de données MySQL : Installing MySQL system tables...
 OK
 Filling help tables...
 OK
 To start mysqld at boot time you have to copy
 support-files/mysql.server to the right place for your system
 (...)
 Démarrage de MySQL :                                       [  OK  ]

ADE4 for R

 install.packages('ade4')
Personal tools