Entering edit mode
7.5 years ago
grant.hovhannisyan
★
2.6k
Hi Biostars,
Is it possible to visualize only the subset of reads from a bam file using IGV?
Thanks,
EDIT:
Let's try to find completely universal way of doing this:
Is it possible to visualize only the subset of reads (1 mln random reads) from a bam file using IGV?
what do you mean with "subset" ?
from the original bam file I extract some reads, write them to a new file and want to visualize it.
Make a bed file with the regions you are interested in.
Then load new.bam into IGV.
Thanks, but I am interested in opposite thing - I want to find the regions where these particular reads are alligned to.
Then rephrase your original question, because "from the original bam file I extract some reads, write them to a new file and want to visualize it" is exactly what my command does.
well, I extract them not from the particular region of interest or the region that I know in advance.
Then how do you know that they ARE the reads of interest?
Edit: Looking at the edit of your original question that does not seem to be a requirement.
You can search for specific reads using the headers in IGV (as long as this is a small number). Is that you want want?
yeah, but there are a couple of million reads:)
It should be possible to sample the BAM. Visualize as usual with IGV. Use
reformat.sh in=original.bam out=subset.bam samplereadstarget=1000000 sampleseed=1000
from BBMap suite. Pay particular attention to SAM/BAM and sampling parameters.