Question: How to extract a region from a reference sequence which does not align with a given query read?
0
gravatar for pradyumna Sagar
2.2 years ago by
Manipal, School Of Life Sciences
pradyumna Sagar20 wrote:

I have a query sequence with 1935 bp and a reference sequence with 2817 bp. My query aligns fully with the reference sequence. I need to extract the regions from the reference sequence(2817bp) which are not a part of my query i.e.approximately 882 bp. I need to do this for many such files (nearly 200). Please help me with a script if possible. I couldn't find any tools online for the same. Kindly help!

ADD COMMENTlink modified 10 months ago by Snijesh VP190 • written 2.2 years ago by pradyumna Sagar20
2

Look at the samtools faidx solution: Extract User Defined Region From An Fasta File

ADD REPLYlink written 2.2 years ago by genomax52k

what if i do not know the coordinate regions? I mean as I have mentioned I have to perform this nearly 200 times so it will be difficult to check the coordinates of the reference file which do not match with my query each time. Can you help me with a solution which will directly extract the unaligned region from the reference from a SAM/BAM file?

ADD REPLYlink written 2.2 years ago by pradyumna Sagar20
1

extract the region with 0 coverage bedtools: extracting no coverage regions

ADD REPLYlink written 2.2 years ago by Pierre Lindenbaum110k

Can you please explain in detail? I am a beginner.

ADD REPLYlink written 2.2 years ago by pradyumna Sagar20

The link that Pierre provided gives the exact command. What additional explanation do you require?

ADD REPLYlink written 2.2 years ago by harold.smith.tarheel4.1k
1
gravatar for Snijesh VP
10 months ago by
Snijesh VP190
India
Snijesh VP190 wrote:

Try the following

samtools faidx reference.fasta

samtools faidx reference.fasta chr:1-n
ADD COMMENTlink modified 9 months ago • written 10 months ago by Snijesh VP190
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 914 users visited in the last hour