Export data from R
Usage
export(object, con, ...)
# S4 method for DESeqAnalysis,character
export(object, con, compress = FALSE, overwrite = TRUE, quiet = FALSE)
# S4 method for DESeqDataSet,character
export(object, con, compress = FALSE, overwrite = TRUE, quiet = FALSE)
Arguments
- object
Object.
- con
character(1)
. Directory path.- compress
logical(1)
. Apply gzip compression to all files.- overwrite
logical(1)
. Overwrite existing file on disk.- quiet
logical(1)
. Perform command quietly, suppressing messages.- ...
Additional arguments.
Details
Size-factor normalized coutns and FPKM values are calculated on the fly and exported automatically.
Examples
data(deseq)
## DESeqAnalysis ====
con <- AcidBase::tempdir2()
x <- export(deseq, con = con)
#> → Exporting <DESeqDataSet> to data.
#> → Exporting <SummarizedExperiment> to /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data.
#> → Exporting assays "counts", "normalized", "fpkm" to /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/assays.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/assays/counts.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/assays/normalized.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/assays/fpkm.csv using base::`write.table()`.
#> ℹ Dropping 2 non-atomic columns: "geneSynonyms", "ncbiGeneId".
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/rowData.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/colData.csv using base::`write.table()`.
#> → Exporting <DESeqTransform> to transform.
#> → Exporting <SummarizedExperiment> to /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform.
#> → Exporting assays "assay" to /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform/assays.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform/assays/assay.csv using base::`write.table()`.
#> ℹ Dropping 2 non-atomic columns: "geneSynonyms", "ncbiGeneId".
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform/rowData.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform/colData.csv using base::`write.table()`.
#> → Exporting `DESeqResults` tables to resultsTables.
#> ℹ 30 differentially expressed genes (alpha < 0.01).
#> ℹ 17 upregulated genes (alpha < 0.01).
#> ℹ 13 downregulated genes (alpha < 0.01).
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/all.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/up.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/down.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/both.csv using base::`write.table()`.
#> ℹ 0 differentially expressed genes (alpha < 0.01).
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/treatment_D_vs_C/all.csv using base::`write.table()`.
#> → Exporting <DESeqResults> matrices to resultsMatrices.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsMatrices/log2FoldChange.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsMatrices/stat.csv using base::`write.table()`.
#> → Exporting /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsMatrices/padj.csv using base::`write.table()`.
print(x)
#> $data
#> $data$assays
#> $data$assays$counts
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/assays/counts.csv"
#>
#> $data$assays$normalized
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/assays/normalized.csv"
#>
#> $data$assays$fpkm
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/assays/fpkm.csv"
#>
#>
#> $data$rowData
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/rowData.csv"
#>
#> $data$colData
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/data/colData.csv"
#>
#>
#> $transform
#> $transform$assays
#> $transform$assays$assay
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform/assays/assay.csv"
#>
#>
#> $transform$rowData
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform/rowData.csv"
#>
#> $transform$colData
#> [1] "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/transform/colData.csv"
#>
#>
#> $resultsTables
#> $resultsTables$condition_B_vs_A
#> all
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/all.csv"
#> up
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/up.csv"
#> down
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/down.csv"
#> both
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/condition_B_vs_A/both.csv"
#>
#> $resultsTables$treatment_D_vs_C
#> all
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsTables/treatment_D_vs_C/all.csv"
#>
#>
#> $resultsMatrices
#> log2FoldChange
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsMatrices/log2FoldChange.csv"
#> stat
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsMatrices/stat.csv"
#> padj
#> "/private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpaRGehr/xedyAXQjDR-171157275904613/resultsMatrices/padj.csv"
#>
AcidBase::unlink2(con)