tag_sequenceExperiment: Extracts read sequences

View source: R/rear_reads.R

tag_sequenceExperimentR Documentation

Extracts read sequences

Description

This function extracts the sequences of reads from a bam file and saves the result as an interemediate file. If the intermediate file already exists, the read sequences are read from disk.

Usage

tag_sequenceExperiment(dp, rlist, aviews, MAX = 25L)

Arguments

dp

a DataPaths object

rlist

a RearrangementList

aviews

an AlignmentViews2 object

MAX

the maximum number of read pairs to extract for a rearrangement. If the number of read pairs supporting a rearrangement is greater than MAX, a random sample of MAX supporting read pairs is returned.

Details

This function calls getReadAlignmentPairs, the function originally called by writeImproperAlignments2. The reason we call this function a second time is that the read sequences were not saved in the initial query. Saving the sequences in the original query would prevent having to access the bam file a second time, though increase the size of the improper read files. We could use. Another improvement in efficiency might come from parsing the original large bam into a smaller bam containing improper read pairs in which both mates were mapped.


cancer-genomics/trellis documentation built on Aug. 20, 2024, 5:48 p.m.