How to extract regions from BAM file on remote server and visualize long-read alignments in IGV?
1
0
Entering edit mode
18 months ago
bxxxmxxxx ▴ 10

Hello, I have code that indicates there are a number of SNP mutations at specific locations for different cell types and none for others. I need to align all the respective long reads at that coordinate to see if my code works. These BAM files are located on a remote server and are too large for me to download them locally to my computer. I am really stuck, can anyone help me out? It is my first time doing this and I've never used IGV before. Happy to answer any questions that might help clarify what I need.

bam igv • 989 views
ADD COMMENT
0
Entering edit mode
18 months ago

if the remote server supports random access, you can use "load from URL": https://software.broadinstitute.org/software/igv/LoadData

otherwise, you could download only a part of the bam:

wget -O - "http://path/to/in.bam" | samtools view -O BAM -o subset.bam -L regions.bed && samtools index  subset.bam
ADD COMMENT
0
Entering edit mode

Sorry to be a noob, but what does the -L region.bed do? As in could you provide an example? I feel in over my head.

ADD REPLY
0
Entering edit mode

the manual is available here: http://www.htslib.org/doc/samtools-view.html

ADD REPLY

Login before adding your answer.

Traffic: 1688 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