Thank you! Quite an easy solution
I need to increase my sequencing depth, so will be generating more reads that will first be trimmed (Trimmomatic) before aligning with STAR. Is there a simply way to just trim and align only the new reads and merge this output with the old STAR output, or do I have to re-run STAR again using all read files (both old and new)? I figure there must be a way to do this, but if it was in the manual I missed it.
For reference, the command I am using in STAR is below. Thanks in advance for any help with this.
STAR --runThreadN 10 --genomeDir path_to_genomeDir/ \
--readFilesIn path_to_R1_paired_trimmed.fq.gz path_to_R2_paired_trimmed.fq.gz \
--readFilesCommand zcat --outReadsUnmapped Fastx
2 answers
samtools merge can combine BAM files. No need to realign all reads.
What are the downstream analyses you will be performing? ATpoint already indicated how you can merge bam files. But I assume you will be performing differential gene expression, in this the case, you can just sum the counts - DESeq2 has the function collapseReplicates() for this task. My particular preference is to first explore the data (different quality between runs, PCA / MDS of the counts), and merge the counts if no potential issues are found. It is important to remember one needs to sequence all samples again, to avoid creating confounded batch effects.
Hi h.mon, you are absolutely right that I am going to be using DESeq2 for my downstream analyses, and I agree that is an important point regarding batch effects. In this case all of my samples have been sequenced on all of these runs, as I was starting small and then adding more lanes to obtain sufficient reads per sample.
Log in to answer this question.