extract_unmapped: Extracts unmapped reads from BAM and writes them to a FASTA...

View source: R/Functions.R

extract_unmappedR Documentation

Extracts unmapped reads from BAM and writes them to a FASTA file

Description

Extracts unmapped reads from BAM and writes them to a FASTA file

Usage

extract_unmapped(bam, outfa = NULL)

Arguments

bam

path to BAM file.

outfa

path to output FASTA (default is same directory as input BAM).

Value

path to FASTA file of unmapped reads.

Author(s)

Kathryn Rozen-Gagnon

Examples

testFasta <- system.file("extdata/hg19Small.fa",package="CLIPflexR")
myIndex <- suppressWarnings(bowtie2_index(testFasta, overwrite=TRUE))
testFQ <- system.file("extdata/Fox3_Std_small.fq.gz",package="CLIPflexR")
FqFile_FF <- ctk_fastqFilter(testFQ,qsFilter="mean:0-29:20")
FqFile <- decompress(FqFile_FF,overwrite=TRUE)
FqFile_clipped <- fastx_clipper(FqFile,length=20)
FqFile_QF <- fastq_quality_trimmer(FqFile_clipped)
FqFile_Col <- ctk_fastq2collapse(FqFile_QF)
FqFile_QFColStripped <- ctk_stripBarcode(FqFile_Col,linkerlength=5, inputFormat="fastq")
bam <- suppressWarnings(bowtie_align(FqFile_QFColStripped,myIndex, 
overwrite=TRUE, inputFormat="fastq"))
extract_unmapped(bam)

kathrynrozengagnon/CLIPflexR documentation built on Dec. 8, 2022, 7:31 p.m.