Entering edit mode
3.9 years ago
I would like to know if I could merge mapped and unmapped files to generate fq.gz paired-end reads and If the last one has the same content as the original fq.gz file that I used to make the alignment.
You should check if the aligned BAM files you have contain unmapped reads. If it does then you just need that file to re-generate the paired-end fastq reads that went into the alignment.
I am sorry if I don't have too much experience using bioinformatic tools but I would like to make the following question. I used BWA to make the alignment, I know I can get unmapped reads from my bam output, that means the output file contains both kind of reads (mapped and unmapped), right?
Thank you so much for your answer!
If you are able to get unmapped reads from your BAM file (e.g. with A: How To Filter Mapped Reads With Samtools ) then yes. Unmapped reads will have a
*
in column number 3 in your BAM file (check withsamtools view your.bam | head -30
).Thank you for all of your help!.
Just last question. I applied some filters on first bam output, sorted, realignment and markduplicates. Should I use the first bam output or could I use the bam with all those filters?