% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/experiment.R
\docType{class}
\name{experiment-class}
\alias{experiment-class}
\alias{experiment}
\title{experiment class definition}
\description{
An object to massivly simplify your coding, by having a
table of all libraries in an experiment. That contains
filepaths and info for each library.
}
\details{
Simplest way to make is to call create.experiment on some
folder with libraries and see what you get. Some of the fields
might be needed to fill in manually. The important thing is
that each row must be unique (excluding filepath), that means
if it has replicates then that must be said explicit. And all
filepaths must be unique and have files with size > 0.
Syntax:
libtype (library type): rna-seq, ribo-seq, CAGE etc.
rep (replicate): 1,2,3 etc
condition: WT (wild-type), control, target, mzdicer, starved etc.
fraction: 18, 19 (fractinations), or other ways to split library.
filepath: Full filepath to file
}
\examples{
\dontrun{
library(ORFik)
# 1. Update path to experiment data  directory (bam files etc)
exp_dir = "/data/processed_data/RNA-seq/Lee_zebrafish_2013/aligned/"
# 2. Set a 5 character name for experiment, (Lee 2013 -> Lee13, Max 2017 -> Max17)
exper_name = "Max17"
# 3. Create a template experiment, and check that it is correct
temp <- create.experiment(exp_dir, exper_name,
 txdb = "/data/references/Zv9_zebrafish/Danio_rerio.Zv9.79.gtf",
 fa = "/data/references/Zv9_zebrafish/Danio_rerio.Zv9.fa")
# 4. Make sure each row(sample) is unique and correct
# You will get a view open now, check the data.frame that it is correct:
# library type (RNA-seq, Ribo-seq), stage, rep, condition, fraction.
# Let say it did not figure out it is RNA-seq, then we do:"
temp$X1[5] <- "RNA" # X1[5 and 6] are libtypes
temp$X1[6] <- "RNA"
# You can also do this in your spread sheet program (excel, libre..)
# Now save new version, if you did not use spread sheet.
save.experiment(temp, paste0("/data/processed_data/experiment_tables_for_R/",
 exper_name,".csv"))
# 5. Load experiment, this will validate that you actually made it correct
df <- read.experiment(paste0("/data/processed_data/experiment_tables_for_R/",
 exper_name,".csv"))
# Set experiment name not to be assigned to variable
df@expInVarName <- FALSE
df
}
}
