makeVRangesFromDataFrame: Construct a VRanges Object from a data frame

Description Usage Arguments Value See Also Examples

View source: R/complex_functions.R

Description

In this package, big data frames are generated from cohort wide vcf-like files. This function constructs a VRanges object from such a data frame by using makeGRangesFromDataFrame from the package GenomicRanges

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
makeVRangesFromDataFrame(
  in_df,
  in_keep.extra.columns = TRUE,
  in_seqinfo = NULL,
  in_seqnames.field = "X.CHROM",
  in_start.field = "POS",
  in_end.field = "POS",
  in_PID.field = "PID",
  in_subgroup.field = "subgroup",
  in_strand.field = "strand",
  verbose_flag = 1
)

Arguments

in_df

A big dataframe constructed from a vcf-like file of a whole cohort. The first columns are those of a standard vcf file, followed by an arbitrary number of custom or user defined columns. One of these can carry a PID (patient or sample identifyier) and one can carry subgroup information.

in_keep.extra.columns

in_seqinfo Argument passed on to makeGRangesFromDataFrame

in_seqinfo

A seqInfo object, referring to the reference genome used. Argument passed on to makeGRangesFromDataFrame

in_seqnames.field

Indicates the name of the column in which the chromosome is encoded

in_start.field

Indicates the name of the column in which the start coordinate is encoded

in_end.field

Indicates the name of the column in which the end coordinate is encoded

in_PID.field

Indicates the name of the column in which the PID (patient or sample identifier) is encoded

in_subgroup.field

Indicates the name of the column in which the subgroup information is encoded

in_strand.field

Indicates the name of the column in which the strandedness is encoded

verbose_flag

Verbose if 1

Value

The constructed VRanges object

See Also

makeGRangesFromDataFrame

Examples

1
2
3
4
5
 data(lymphoma_test)
 temp_vr <- makeVRangesFromDataFrame(lymphoma_test_df,
                                     in_seqnames.field="CHROM",
                                     in_subgroup.field="SUBGROUP",
                                     verbose_flag=1)

YAPSA documentation built on Nov. 8, 2020, 4:59 p.m.