BAM file processing in chunks in R
1
0
Entering edit mode
7.0 years ago
Tobias ▴ 150

When I want to process a FASTQ file in chunks in R, I can use the "FastqStreamer" function from the Bioconductor package "ShortRead".

Is there an analogous function for BAM files (for instance, in the "Rsamtools" package)? If so, could you give some toy code?

Many thanks for your help in advance!

R sequencing RNA-Seq • 2.9k views
ADD COMMENT
0
Entering edit mode
7.0 years ago
ivivek_ngs ★ 5.2k

Have you tried to read the entire vignette of Rsamtools? There is a function call scanBam. Take a look at this link.

Alternatively if you already have bam chunks for specific chromosomes which you can obtain by splitting the total bams for each chromosomes and then process with scanBAM. Take a look at this SO link.

Splitting bam files in bash

Split with samtools

Bioconductor For Large Bam File Analysis

ADD COMMENT

Login before adding your answer.

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