Description Usage Arguments Methods and Functions Author(s) See Also Examples
This function extracts random samples from a BAM file. It uses the
samtools view
function, thus samtools
have to be
installed. Samtool's view -s
option selects reads according to
scores based on a hash calculated from their read names. Hence whether
reads are sampled depends on the name of the read which means that
read pairs are sampled together (if they have the same name).
1 2 3 4 5 6 7 |
... |
Additional arguments to be passed to the
|
fraction |
The proportion of reads to be sampled from the BAM file. |
outfile |
The file name of the intermediate BAM file that is generated by the
|
seed |
The seed for the random number generator. |
x |
The BAM file name or a |
the function samples the specified fraction of reads from the Bam
file. The returned object is a list of lists. For more details
please see the help of the scanBam
function.
Johannes Rainer
1 2 3 4 5 6 7 8 9 | #############
## Examples:
##
## Perform a quality assessment on a fastq file:
dirpath <- system.file( package="SeqUtils", "extdata" )
bamfile <- dir( dirpath, "example.bam", full=TRUE )
BamSample <- sampleBam( bamfile, fraction=0.01 )
BamSample
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.