R/extractSeqs.R

Defines functions extractSeqs

extractSeqs <-
function(bed.table, genom) {
    n <- nrow(bed.table)
    seqs <- rep(NA, n)
    cat("Extracting sequences (. = 10 amplicons):\n")
    for(i in 1:n) {
        seqs[i] <- as.character(getSeq(genom, bed.table[i, "chrom"], bed.table[i, "chromStart"] + 1, bed.table[i, "chromEnd"]))
        if(i%%10 == 0) cat(".")
        if(i%%500 == 0 || i == n) cat(i, "/" ,n ,"\n", sep="")
    }
    return(seqs)
}

Try the ionflows package in your browser

Any scripts or data that you put into this service are public.

ionflows documentation built on May 2, 2019, 3:08 p.m.