Learn R Programming

MetamapsDB (version 0.0.2)

map: map takes cDNA reads (fastQ format) and maps them onto contigs

Description

uses blat to map the mRNA to the contigs fasta and returns the tabular blast format blat was chosen for its ability to show multiple hits https://www.biostars.org/p/17613/

Usage

map(reads, contigs)

Arguments

reads

Shortread object or path to short reads file in fastq format

contigs

path to contig file in fa format

Examples

Run this code
# NOT RUN {
# newbler2/K00927
#    454AllContigs.fna
#    input
#        K00927.1.fq
#        K00927.2.fq

lapply(kois, function(ko){
    read1 = sprintf("./newbler2/%s/input/%s.2.fq", ko, ko)
    if file.exists(read1)
        read1.fq = read1 %>% readFastq
    read2 = sprintf("./newbler2/%s/input/%s.2.fq", ko, ko)
    if file.exists(read2)
        read2.fq = read2 %>% readFastq
    combined = c(grep.cDNA(read1.fq),grep.cDNA(read2.fq))
    contigs = sprintf("./newbler2/%s/454AllContigs.fna", ko)
    output = sprintf("./blat/%s.m8", ko)
    blast8 = map(combined, contigs, output) %<>% tbl_df
})
# }

Run the code above in your browser using DataLab