Learn R Programming

spp (version 1.16.0)

read.tagalign.tags: Read in tagalign tags

Description

Fill in later

Usage

read.tagalign.tags(filename, fix.chromosome.names = T, fix.quality = T)

Arguments

filename

Filename of tag file

fix.chromosome.names

chromosome names

fix.quality

fix quality

Value

a list like structure

Details

...

References

spp by kharchenko

See Also

Buh!

Examples

Run this code
# NOT RUN {
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (filename, fix.chromosome.names = T, fix.quality = T) 
{
    tl <- lapply(.Call("read_tagalign", path.expand(filename)), 
        function(d) {
            xo <- order(abs(d$t))
            d$t <- d$t[xo]
            d$n <- d$n[xo]
            if (fix.quality) {
                if (min(d$n) < 0.5) {
                  d$n = ceiling(1000/4^d$n)
                }
                break.vals <- unique(sort(c(0, unique(d$n))))
                d$n <- length(break.vals) - 1 - cut(d$n, breaks = break.vals, 
                  labels = F)
            }
            return(d)
        })
    if (fix.chromosome.names) {
        names(tl) <- gsub("\.fa", "", names(tl))
    }
    return(list(tags = lapply(tl, function(d) d$t), quality = lapply(tl, 
        function(d) d$n)))
  }
# }

Run the code above in your browser using DataLab