thank you so much, Pierre.
I modified the sed part [12] to [.1.2] and it works. So the final command, which works for me is:
samtools view -h in.bam| sed '/^[^@]/s/^\(.*\)\.[.1.2]\t/\1\t/' | samtools view -Sb -o out.bam
May I clarify for the future reference, how paired-end reads can be annotated with extensions 1 and 2? What software was used for this?
I assume you got this data from SRA? You should have used
-F|--origfmt Defline contains only original sequence nameoption to avoid getting these kind of read names.As for adding
/1 /2to read names you could usereformat.shfrom BBMap suite with theaddslash=toraddcolon=toptions.ohhh ok, so you mean when I convert SRA to FATSQ with
fastq-dump -FuseFoptionThank you