create_PAC | R Documentation |
create_PAC
Merges lanes, performs adaptor trimming and makes a first PAC object
with count and basic phenotypic information
create_PAC(lanes = NULL, trim = NULL, input, output = NULL)
lanes |
allows to define whether lanes should be merged with |
trim |
Character vector to define whether trimming of adaptors should be performed.
Current accepted values are "default_neb" and "default_illumina", trimming
adaptors from library preparation with NebNext or Illumina technologies
respectively. More advanced and manual adaptor trimming is possible with
|
input |
Character indicating path to where input files can be found in fasta or fastq format. Depending on value of lanes and trim, the function assumes whether to expect files in path to be trimmed or not and whether to merge lanes. |
output |
Character indicating path to where output files will be stored, if applicable (such as in merge_lanes). Default=NULL. |
Given (at minimum) an path to input files to be analyzed, create_PAC will wrap around
all necessary preparatory steps (merge_lanes
, make_counts
, and
make_PAC
) to produce a PAC object. This wrapper comes with the caveat that
it uses default values in most functions. If that does not suit your analysis, we recommend
you to run each function on its own!
PAC object with values in pheno and count
https://github.com/Danis102 for updates on the current package.
Other PAC generation:
PAC_check()
,
make_PAC()
,
make_counts()
,
make_cutadapt()
,
make_pheno()
,
make_trim()
,
merge_lanes()
###########################################################
### test the map_rangetype function
# More complicated examples can be found in the vignette.
##----------------------------------------
# First create an annotation blank PAC with group means
sys_path = system.file("extdata", package = "seqpac", mustWork = TRUE)
fq <- list.files(path = sys_path, pattern = "fastq", all.files = FALSE,
full.names = TRUE)
# Create an output folder
input <- paste0(tempdir(), "/lanes/")
output <- paste0(tempdir(), "/merged/")
dir.create(input, showWarnings=FALSE)
dir.create(output, showWarnings=FALSE)
# Fix compatible file names
file.copy(from = fq, to = input)
old_fls <- list.files(input, full.names=TRUE)
new_sample <- c(rep("sample1_", times=3), rep("sample2_", times=3))
new_lane <- rep(c("lane1","lane2","lane3"), times=2)
new_fls <- paste0(input,new_sample, new_lane, ".fastq.gz")
file.rename(from = old_fls, to = new_fls)
# Then merge the fastq files
pac <- create_PAC(lanes=TRUE, trim="default_neb", input, output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.