Description Usage Arguments Value Author(s) Examples
View source: R/metaseqr.count.R
Create the main sample list and determine the BAM/BED files for each sample from an external file.
1 | read.targets(input, path = NULL)
|
input |
a tab-delimited file structured as
follows: the first line of the external tab
delimited file should contain column names (names
are not important). The first column MUST contain
UNIQUE sample names. The second column MUST contain
the raw BAM/BED files WITH their full path.
Alternatively, the |
path |
an optional path where all the BED/BAM files are placed, to be prepended to the BAM/BED file names in the targets file. |
A named list with four members. The first member is
a named list whose names are the conditions of the
experiments and its members are the samples belonging
to each condition. The second member is like the
first, but this time the members are named vectors
whose names are the sample names and the vector
elements are full path to BAM/BED files. The third
member is like the second, but instead of filenames
it contains information about single- or paired-end
reads (if available). The fourth member is like the
second, but instead of filenames it contains
information about the strandedness of the reads (if
available). The fifth member is the guessed type
of the input files (SAM/BAM or BED). It will be used
if not given in the main read2count
function.
Panagiotis Moulos
1 2 3 4 5 6 7 8 9 | targets <- data.frame(sample=c("C1","C2","T1","T2"),
filename=c("C1_raw.bam","C2_raw.bam","T1_raw.bam","T2_raw.bam"),
condition=c("Control","Control","Treatment","Treatment"))
path <- "/home/chakotay/bam"
write.table(targets,file="~/targets.txt",sep="\t",row.names=FALSE,
quote=FALSE)
the.list <- read.targets("~/targets.txt",path=path)
sample.list <- the.list$samples
bamfile.list <- the.list$files
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.