addViewpointFrags: Add the information of the viewpoint fragments

Description Usage Arguments Value Author(s) See Also Examples

View source: R/reference_fragments.R

Description

addViewpointFrags adds the genomic position and information of the viewpoint primer fragments to colData of the FourC object.

Usage

1
addViewpointFrags(object, primerFragFile)

Arguments

object

A FourC object.

primerFragFile

character string defining the file that contains the information about the primer fragments. Defaults to "primerFragments.rda" which is the default output file of findViewpointFragments in the provided fragmentDir.

Value

Updated FourC object with information about the viewpoint fragments added to colData.

Author(s)

Felix A. Klein, felix.klein@embl.de

See Also

FourC, findViewpointFragments

Examples

 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
metadata <- list(projectPath=tempdir(),
                 fragmentDir="re_fragments",
                 referenceGenomeFile=system.file("extdata/dm3_chr2L_1-6900.fa", 
                                                 package="FourCSeq"),
                 reSequence1="GATC",
                 reSequence2="CATG",
                 primerFile=system.file("extdata/primer.fa", 
                                        package="FourCSeq"),
                 bamFilePath=system.file("extdata/bam", package="FourCSeq"))

colData <- DataFrame(viewpoint = "testdata", 
                     condition = factor(rep(c("WE_68h", "MESO_68h", "WE_34h"),                    
                                            each=2),
                                        levels = c("WE_68h", "MESO_68h", "WE_34h")),
                     replicate = rep(c(1, 2), 
                                     3),
                     bamFile = c("CRM_ap_ApME680_WE_6-8h_1_testdata.bam", 
                                 "CRM_ap_ApME680_WE_6-8h_2_testdata.bam",       
                                 "CRM_ap_ApME680_MESO_6-8h_1_testdata.bam", 
                                 "CRM_ap_ApME680_MESO_6-8h_2_testdata.bam", 
                                 "CRM_ap_ApME680_WE_3-4h_1_testdata.bam",
                                 "CRM_ap_ApME680_WE_3-4h_2_testdata.bam"),
                     sequencingPrimer="first")

fc <- FourC(colData, metadata)
fc

fc <- addFragments(fc)

findViewpointFragments(fc) 

fc <- addViewpointFrags(fc)
fc

FourCSeq documentation built on Nov. 8, 2020, 7:08 p.m.