Learn R Programming

CNOGpro (version 1.1)

CNOGpro: Set up a new CNOGpro experiment

Description

This function initializes the CNOGpro experiment.

Usage

CNOGpro(hitsfile, gbkfile, windowlength = 100, name =  "Default organism")

Arguments

hitsfile
Path to a text file containing two columns: The first column is a chromosome identifier, and the second column is the leftmost coordinate (in the reference organism) of a mapped read. Each row represents one single read.
gbkfile
The GenBank Flat Format file of the organism used as a reference in the resequencing study. Must contain DNA sequence, not just annotations. Multi-chromosomal files are not currently supported, and should be parsed separately.
windowlength
Integer length of the sliding window which will be used when counting read density.
name
(Optional) A name of the organism or copy number experiment.

Value

An object of class CNOGpro, which can be used in further CNV analysis. Essentially a list containing the following elements:
Name
The name of the organism or project, as set by this method.
windowlength
The length of the sliding window when counting reads
accession
The accession number of the chromosome, from the provided GenBank file
genes
A table of genetic elements in the chromosome, including intergenic regions. The table will also hold copy numbers as inferred from the runHMM and runBootstrap methods.
chrlength
The length of the chromosome
GCperwindow
The GC-percentage, calculated in sliding windows.
is_GC_normalized
logical indicating whether data has been normalized or not
ReadsprWindow
The (raw) read counts in sliding windows
CorrReadsprWindow
The read counts in sliding windows, corrected for GC bias. Acquired from the normalizeGC method.
HMMtable
The data frame of breakpoints and states inferred from the runHMM method.

Details

The function accepts a minimum input of the GenBank file, but will not be able to do any copy number analysis in this mode. As such, the primary use of this modes when the user just wants to print a table of genetic elements.

The hitsfile can be constructed from a SAMtools binary alignment/ map (.bam) file by entering the following at the shell command line: samtools view infile.bam | perl -lane 'print \"$F[2]\t$F[3]\"' > out.hits

References

Manuscript not yet published.

See Also

normalizeGC, runBootstrap, runHMM, store

Examples

Run this code
carsonella <- CNOGpro(hitsfile=system.file("extdata/carsonellahits.tab", package="CNOGpro"),
gbkfile=system.file("extdata/CP003467.gbk",package="CNOGpro"), windowlength=100,
name="Artificial Carsonella ruddii data")
plotCNOGpro(carsonella)
printCNOGpro(carsonella)

Run the code above in your browser using DataLab