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

Description Usage Arguments Examples

View source: R/mapping.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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
})

## End(Not run)

MetamapsDB documentation built on May 1, 2019, 9:23 p.m.