Matt:LabNotes/2014-7-30
Jump to navigation
Jump to search
RNA-SeQC
- Bam input
- Add Read Groups and coordinate sort
- Picard.AddOrReplaceReadGroups
- Add Read Groups and coordinate sort
java -Xmx2g -jar /home/kunzhang/softwares/picard-tools-1.79/AddOrReplaceReadGroups.jar INPUT='accepted_hits.bam' OUTPUT='accepted_hits_RanHex.coorsortRG.bam' SORT_ORDER=coordinate RGID='1' RGLB='RTprimer' RGPL='ILLUMINA' RGPU='flowcell-barcode.lane' RGSM='RanHex'
- Index reference fasta and create sequence dictionary
- reference fasta index already exists
- Index reference fasta and create sequence dictionary
/home/kunzhang/HsGenome/hg19/HsGenome19.fa.fai
- Picard.CreateSequenceDictionary
java -Xmx2g -jar /home/kunzhang/softwares/picard-tools-1.79/CreateSequenceDictionary.jar REFERENCE=/home/kunzhang/HsGenome/hg19/HsGenome19.fa OUTPUT=/home/mzcai/Genomes/HsGenome19.dict
- Match order of contigs in Bam file to reference file
- Picard.ReorderSam
- Match order of contigs in Bam file to reference file
java -Xmx2g -jar /home/kunzhang/softwares/picard-tools-1.79/ReorderSam.jar INPUT=accepted_hits_RanHex.coorsortRG.bam OUTPUT=accepted_hits_RanHex.coorsortRGreorder.bam REFERENCE=/home/mzcai/Genomes/HsGenome19.fa
- Index bam file
samtools index accepted_hits_RanHex.coorsortRGreorder.bam
- Create sample file: ~/scratch/RanHex_EnrichmRNA/inVitroRTSeq/RNA-SeQC_samples.txt
Sample ID Bam File Notes RanHex /home/mzcai/scratch/RanHex_EnrichmRNA/inVitroRTSeq/tophat_hg19unmask_Indx26_RanHex/accepted_hits_RanHex.coorsortRGreorder.bam Indx26RanHex
java -jar /home/kunzhang/softwares/RNA-SeQC_v1.1.7.jar -bwa /home/kunzhang/softwares/bwa-0.7.5a/bwa -BWArRNA /home/mzcai/scratch/RanHex_EnrichmRNA/mart_export_exons_totalrRNA.fa -o /home/mzcai/scratch/RanHex_EnrichmRNA/inVitroRTSeq/RNA-SeQC_output -r /home/mzcai/Genomes/HsGenome19.fa -s /home/mzcai/scratch/RanHex_EnrichmRNA/inVitroRTSeq/RNA-SeQC_samples.txt -singleEnd -t /home/mzcai/LTS/Genomes/Homo_sapiens.GRCh37.75.chr.gtf -ttype 2 The required transcript_id attribute was not found on line chr1 pseudogene gene 11869 14412 . + . gene_id "ENSG00000223972"; gene_name "DDX11L1"; gene_source "ensembl_havana"; gene_biotype "pseudogene";
Download resources from broadinstitute
- ~/Genomes/RNA-SeQCResources
- Download human rRNA reference file
human_all_rRNA.fasta
- Download GENCODE GTF file
gencode.v7.annotation.gtf
- Download GENCODE GC definitions file
gencode.v7.gc.txt
java -jar /home/kunzhang/softwares/RNA-SeQC_v1.1.7.jar -bwa /home/kunzhang/softwares/bwa-0.7.5a/ -BWArRNA ~/Genomes/RNA-SeqCResources/human_all_rRNA.fasta -s ~/scratch/RanHex_EnrichmRNA/inVitroRTSeq/RNA-SeQC_samples.txt -t ~/Genomes/RNA-SeqCResources/gencode.v7.annotation.gtf -r ~/Genomes/HsGenome19.fa -o ~/scratch/RanHex_EnrichmRNA/inVitroRTSeq/RNA-SeQC_output/ -strat gc -gc ~/Genomes/RNA-SeqCResources/gencode.v7.gc.txt -singleEnd org.broadinstitute.sting.utils.exceptions.UserException$LexicographicallySortedSequenceDictionary: Lexicographically sorted human genome sequence detected in reads.
For safety's sake the GATK requires human contigs in karyotypic order: 1, 2, ..., 10, 11, ..., 20, 21, 22, X, Y with M either leading or trailing these contigs. This is because all distributed GATK resources are sorted in karyotypic order, and your processing will fail when you need to use these files. You can use the ReorderSam utility to fix this problem: http://www.broadinstitute.org/gsa/wiki/index.php/ReorderSam