Hello,
I am developing a java application which is using the bwa-algorithms to align reads to reference databases.
Basically the idea was, that a given Input file is mapped to a reference, and the unmapped and mate reads are then mapped again to the next reference (until all references are processed) one outputfile containg all remaining unmapped reads should remain.
This works fine for singe read data, but for paired data not.
Unfortunetly BWA 0.5.9 doesn't support the input of one Paired(merged) file, you have to run twice the aln programm and then the sampe tool.
This also wouldn't be a big deal, but the main problem is, after sampe is done I have to extract the unmapped and mate reads via -samtools view and convert it with bam2fastq to a normal fastq file.
So I wanted to ask you if you have any suggestions how to extract the reads in an very easy and also for the usage as a input file again, way. And if you know which flags i have excatly to use to extract bot, unmapped and mate reads.
The rathest for me would be, if I could use sam tools, that he is extracting the paired reads again into two files, so that i dont have to split the file again into forward and reverse strand.
Thank you very much for your help,
Tomi
I am developing a java application which is using the bwa-algorithms to align reads to reference databases.
Basically the idea was, that a given Input file is mapped to a reference, and the unmapped and mate reads are then mapped again to the next reference (until all references are processed) one outputfile containg all remaining unmapped reads should remain.
This works fine for singe read data, but for paired data not.
Unfortunetly BWA 0.5.9 doesn't support the input of one Paired(merged) file, you have to run twice the aln programm and then the sampe tool.
This also wouldn't be a big deal, but the main problem is, after sampe is done I have to extract the unmapped and mate reads via -samtools view and convert it with bam2fastq to a normal fastq file.
So I wanted to ask you if you have any suggestions how to extract the reads in an very easy and also for the usage as a input file again, way. And if you know which flags i have excatly to use to extract bot, unmapped and mate reads.
The rathest for me would be, if I could use sam tools, that he is extracting the paired reads again into two files, so that i dont have to split the file again into forward and reverse strand.
Thank you very much for your help,
Tomi