would be good to map reads as PE.
Might be a question of bwa version -> latest supports PE mapping
there are 2 official solutions
1) -> concatenate in one file (1_R1&1_R2, 2_R1&2R2, and then cat the unpaired reads)
2) -> run bwa map twice first on R1 R2 as PE and then only on unpaired files. -> then merge the 2 mapped reads files - will need to resort and probably update index with samtools (only if pilon bugs) - (then bwa mem should probably have rescued some reads)
I do not know why (but it seemed to me that concatenating all in one file (solution 1) did not work as well as running bwa mem on pairs and then on unpaired). So if this solution is choose, would be good to test that it works as it should.
seems anyway more difficult to use in pilon afterwards with solution 1) - so recommend solution 2.
and use paired.bam and unpaired.bam as input in pilon. -> Can re-test if you want
interlacing worked nicely with that to interlace (seqtk mergepe R[1,2]_reads.fastq; cat U1.fastqc; cat U2.fastq) > all_interlaced_merged.fastq) -> could pipe it also to avoid plenty new files... (nb: 2 cat here because I have 2 unpaired files because I used the corrected upaired from spades...next issue) - if used : need to add ' -p' option to indicate interleaved format is input
would be good to map reads as PE. Might be a question of bwa version -> latest supports PE mapping there are 2 official solutions 1) -> concatenate in one file (1_R1&1_R2, 2_R1&2R2, and then cat the unpaired reads) 2) -> run bwa map twice first on R1 R2 as PE and then only on unpaired files. -> then merge the 2 mapped reads files - will need to resort and probably update index with samtools (only if pilon bugs) - (then bwa mem should probably have rescued some reads)
I do not know why (but it seemed to me that concatenating all in one file (solution 1) did not work as well as running bwa mem on pairs and then on unpaired). So if this solution is choose, would be good to test that it works as it should. seems anyway more difficult to use in pilon afterwards with solution 1) - so recommend solution 2. and use paired.bam and unpaired.bam as input in pilon. -> Can re-test if you want
interlacing worked nicely with that to interlace (seqtk mergepe R[1,2]_reads.fastq; cat U1.fastqc; cat U2.fastq) > all_interlaced_merged.fastq) -> could pipe it also to avoid plenty new files... (nb: 2 cat here because I have 2 unpaired files because I used the corrected upaired from spades...next issue) - if used : need to add ' -p' option to indicate interleaved format is input