| bowtie_align | R Documentation |
Alignment using Rbowtie2
bowtie_align( fq, index, outbam = "fq", inputFormat = "fasta", keepSAM = T, mode = "genome_map", maxMismatches = 0, seedSubString = 18, threads = 1, report_k = NULL, keep_all = NULL, soft_clip = NULL, additional_Args = NULL, overwrite = FALSE )
fq |
path to file to process (fasta or fastq). |
index |
bowtie2 index name without extension. |
outbam |
output bam name, not required if mode is set. If mode is set to "NULL", specify "fq" (default - name of file to process/reads) or "index" (name of index) |
inputFormat |
Format of reads, "fastq" or "fasta" (default). |
keepSAM |
keep bowtie2 SAM output file, TRUE (default) or FALSE. |
mode |
mapping mode, "genome_map" (default - 1 mismatch in seed alignment, seed substring of 18) or "reverse_map" (for mapping short sequences to reads, i.e. miRNAs or chimera analysis, 0 mismatches and a seed substring of 18); set mode=NULL to custom set bowtie2 options using arguments below or additional arguments. |
maxMismatches |
max mismatches in seed alignment, (default is 0). |
seedSubString |
length of seed substrings (default is 18). |
threads |
number of threads to use (default is 1). |
report_k |
number of alignments to report, default is NULL (the best alignment is reported), set to integer to specify. |
keep_all |
report all alignments, default is NULL (the best alignment is reported), set to TRUE to report all. |
soft_clip |
allow soft clipping, default is NULL (no soft clipping), set to TRUE to to soft clip. |
additional_Args |
any additional mapping arguments not set above, default is NULL, can be set by specifying a single character string with spaces between arguments (see example below); run "Rbowtie2::bowtie2_usage()" to see all options; please note that due to a Rbowtie2 bug, the "–no-1mm-upfront" is not available. |
overwrite |
overwrite existing output files, TRUE or FALSE (default). |
path to sorted BAM.
Kathryn Rozen-Gagnon
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 <- decompress(testFQ,overwrite=TRUE)
FqFile_FF <- ctk_fastqFilter(FqFile,qsFilter="mean:0-29:20",verbose=TRUE)
FqFile_clipped <- fastx_clipper(FqFile_FF,length=20)
FqFile_QF <- fastq_quality_trimmer(FqFile_clipped)
FqFile_Col <- ctk_fastq2collapse(FqFile_QF,verbose=TRUE)
FqFile_ColStrip <- ctk_stripBarcode(FqFile_Col,linkerlength=5, inputFormat="fastq")
##map reads to genome
suppressWarnings(bowtie_align(FqFile_ColStrip,myIndex,
inputFormat="fastq", overwrite=TRUE))
##map reads to genome, custom mode
suppressWarnings(bowtie_align(FqFile_ColStrip,myIndex, mode=NULL,
soft_clip=TRUE, additional_Args="--mp 15 -R 4", inputFormat="fastq", overwrite=TRUE))
##map miRNAs to reads
miRNAs <- system.file("extdata/hsa_mature.fa",package="CLIPflexR")
FaFile_Fa <- fastx_qtoa(FqFile_ColStrip)
readIndex <- bowtie2_index(FaFile_Fa, overwrite=TRUE)
suppressWarnings(bowtie_align(miRNAs,readIndex, mode="reverse_map",overwrite=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.