Hi all,
I'm wondering about the best way to align reads from multiple lanes/runs when using Tophat.
As I understand it, if I have multiple fastq files for each sample, I should call tophat once per sample like
tophat ref sampleA_run1_R1.fastq,sampleA_run2_R1.fastq sampleA_run1_R2.fastq,sampleA_run2_R2.fastq
The problem is: I want each read in the resulting bam file to have read group information telling me which run/lane it came from, so that later differential expression analyses can correct for batch effects. But, if I run tophat using the above, the reads from run1 and run2 are merged together into one bam file with no distinguishing read group information.
Another alternative is to use tophat on each experimental condition separately and then merge the resulting bam files, something roughly like
tophat ref sampleA_run1_R1.fastq sampleA_run1_R2.fastq
tophat ref sampleA_run2_R1.fastq,sampleA_run2_R1.fastq
java -jar MergeSamFiles.jar INPUT=sampleA_run1.bam INPUT=sampleA_run2.bam OUTPUT=sampleA.bam
If I do this I could insert the correct read group information into each bam file before merging, so that the reads in the merged bam are distinguishable. But, if I do this, tophat is mapping each run separately, and doesn't get to use all available evidence to come up with exon-exon junctions in its iterative remapping strategy, so the mapping might not be ideal.
I have considered mapping everything once to get the exon-exon junction file, then feeding that back into tophat and mapping everything AGAIN in order to insert read group info - but this seems like it really shouldn't be necessary. Is there any way to get tophat to assign different read group information to different input fastq files? Or is there a better way?
Thanks for any help!
I'm wondering about the best way to align reads from multiple lanes/runs when using Tophat.
As I understand it, if I have multiple fastq files for each sample, I should call tophat once per sample like
tophat ref sampleA_run1_R1.fastq,sampleA_run2_R1.fastq sampleA_run1_R2.fastq,sampleA_run2_R2.fastq
The problem is: I want each read in the resulting bam file to have read group information telling me which run/lane it came from, so that later differential expression analyses can correct for batch effects. But, if I run tophat using the above, the reads from run1 and run2 are merged together into one bam file with no distinguishing read group information.
Another alternative is to use tophat on each experimental condition separately and then merge the resulting bam files, something roughly like
tophat ref sampleA_run1_R1.fastq sampleA_run1_R2.fastq
tophat ref sampleA_run2_R1.fastq,sampleA_run2_R1.fastq
java -jar MergeSamFiles.jar INPUT=sampleA_run1.bam INPUT=sampleA_run2.bam OUTPUT=sampleA.bam
If I do this I could insert the correct read group information into each bam file before merging, so that the reads in the merged bam are distinguishable. But, if I do this, tophat is mapping each run separately, and doesn't get to use all available evidence to come up with exon-exon junctions in its iterative remapping strategy, so the mapping might not be ideal.
I have considered mapping everything once to get the exon-exon junction file, then feeding that back into tophat and mapping everything AGAIN in order to insert read group info - but this seems like it really shouldn't be necessary. Is there any way to get tophat to assign different read group information to different input fastq files? Or is there a better way?
Thanks for any help!