View source: R/makeVariantExperimentFromGDS.R
makeVariantExperimentFromGDS | R Documentation |
Conversion of gds files into SummarizedExperiment object.
makeVariantExperimentFromGDS(
file,
ftnode,
smpnode,
assayNames = NULL,
rowDataColumns = NULL,
colDataColumns = NULL,
rowDataOnDisk = TRUE,
colDataOnDisk = TRUE,
infoColumns = NULL
)
makeVariantExperimentFromSEQGDS(
file,
ftnode = "variant.id",
smpnode = "sample.id",
assayNames = NULL,
rowDataColumns = NULL,
colDataColumns = NULL,
infoColumns = NULL,
rowDataOnDisk = TRUE,
colDataOnDisk = TRUE
)
makeVariantExperimentFromSNPGDS(
file,
ftnode = "snp.id",
smpnode = "sample.id",
assayNames = NULL,
rowDataColumns = NULL,
colDataColumns = NULL,
rowDataOnDisk = TRUE,
colDataOnDisk = TRUE
)
file |
the GDS file name to be converted. |
ftnode |
the node name for feature id (e.g., "variant.id", "snp.id", etc.). |
smpnode |
the node name for sample id (e.g., "sample.id"). |
assayNames |
the gds node name that will be read into the
|
rowDataColumns |
which columns of |
colDataColumns |
which columns of |
rowDataOnDisk |
whether to save the |
colDataOnDisk |
whether to save the |
infoColumns |
which columns of |
An VariantExperiment
object.
## gds file from DNA-seq data
seqfile <- SeqArray::seqExampleFileName(type="gds")
ve <- makeVariantExperimentFromGDS(seqfile)
## all assay data
names(assays(ve))
showAvailable(seqfile)
## only read specific columns for feature / sample annotation.
assayNamess <- showAvailable(seqfile)$assayNames
rowdatacols <- showAvailable(seqfile)$rowDataColumns
coldatacols <- showAvailable(seqfile)$colDataColumns
infocols <- showAvailable(seqfile)$infoColumns
ve1 <- makeVariantExperimentFromGDS(
seqfile,
assayNames = assayNamess[2],
rowDataColumns = rowdatacols[1:3],
colDataColumns = coldatacols[1],
infoColumns = infocols[c(1,3,5,7)],
rowDataOnDisk = FALSE,
colDataOnDisk = FALSE)
assay(ve1)
## the rowData(ve1) and colData(ve1) are now in DataFrame format
rowData(ve1)
colData(ve1)
## gds file from genotyping data
snpfile <- SNPRelate::snpgdsExampleFileName()
ve <- makeVariantExperimentFromGDS(snpfile)
rowData(ve)
colData(ve)
metadata(ve)
## Only read specific columns for feature annotation.
showAvailable(snpfile)
ve1 <- makeVariantExperimentFromGDS(snpfile, rowDataColumns=c("snp.allele"))
rowRanges(ve1)
## use specific conversion functions for certain gds types
veseq <- makeVariantExperimentFromSEQGDS(seqfile)
vesnp <- makeVariantExperimentFromSNPGDS(snpfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.