Extract aligned positions from reads
1
0
Entering edit mode
9 months ago
María José ▴ 10

Hi, I would like to know if it's possible to extract the specific positions of a target sequence that have aligned from BAM or SAM files. In this situation, more than obtaining all genomic coordinates using bedtools bamtobed. I would like to identify which positions of the reads have aligned to all genomic coordinates. For example in this picture, it would be chr3:186538693-186538967, ID1:276-550. Blast

samtools target-sequence sequencing genomic-coordinates • 883 views
ADD COMMENT
0
Entering edit mode

If you are blasting your sequences you can export your results in CSV format. There you will have these metrics.

ADD REPLY
0
Entering edit mode

Hi, I'm working with aligments obtained with pbmm2, minimap2 and ngmlr. I would like to obtain similar results to those generated by BLAST. I'm looking for ways to extract the target positions that have aligned.

ADD REPLY
1
Entering edit mode
9 months ago

I would like to identify which positions of the reads have aligned to all genomic coordinates.

use my tool sam2tsv : https://jvarkit.readthedocs.io/en/latest/Sam2Tsv/

https://jvarkit.readthedocs.io/en/latest/Sam2Tsv/

ADD COMMENT
0
Entering edit mode

Hi Pierre Lindenbaum, I’ve installed jvarkit and tested it on my data. However, I can't quite understand the output, specially regarding how to determine the genomic coordinates for the read SRR73.14 and the specific part of the sequence it has mapped to.

#Read-Name  Flag    MAPQ    CHROM   READ-POS0   READ-BASE   READ-QUAL   REF-POS1    REF-BASE    CIGAR-OP
SRR73.14    0   0   chr1    0   C   *   9999    N   S
SRR73.14    0   0   chr1    1   T   +   10000   N   S
SRR73.14    0   0   chr1    2   A   +   10001   N   S
SRR73.14    0   0   chr1    3   A   #   10002   N   M
SRR73.14    0   0   chr1    4   A   %   10003   N   M
SRR73.14    0   0   chr1    5   C   %   10004   N   M
SRR73.14    0   0   chr1    6   C   (   10005   N   M
SRR73.14    0   0   chr1    7   C   +   10006   N   M
SRR73.14    0   0   chr1    8   T   '   10007   N   M
ADD REPLY

Login before adding your answer.

Traffic: 4525 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6