File: read.arachne.tags.Rd

package info (click to toggle)
r-cran-spp 1.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 576 kB
  • sloc: cpp: 3,310; ansic: 365; makefile: 2
file content (53 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
\name{read.arachne.tags}
\alias{read.arachne.tags}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ Read in Arachne tags }
\description{
Read in ARACHNE Tag file
}
\usage{
read.arachne.tags(filename, fix.chromosome.names = F)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{filename}{
filename
}
  \item{fix.chromosome.names}{
do we fix chromosome names
}
}

\value{
A list like element
}
%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
Fill in later
}
\examples{
\dontrun{
##---- 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 = F) 
{
    tl <- lapply(.Call("read_arachne_long", path.expand(filename)), 
        function(d) {
            xo <- order(abs(d$t))
            d$t <- d$t[xo]
            d$n <- d$n[xo]
            d$l <- d$l[xo]
            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), length = lapply(tl, function(d) d$l)))
  }
}
}