saveRDS(snakemake, snakemake@log$snakemake)
source(snakemake@params$setup, echo=FALSE)
outFile <- snakemake@output$colData
annoFile <- snakemake@input$sampleAnnoFile
fileMapFile <- snakemake@params$fileMapping
name <- snakemake@wildcards$dataset
anno <- fread(annoFile)
mapping <- fread(fileMapFile)
subset_ids <- snakemake@params$ids
annoSub <- anno[RNA_ID %in% subset_ids]
setnames(annoSub, "RNA_ID", "sampleID")
colData <- merge(annoSub,
mapping[FILE_TYPE == "RNA_BAM_FILE", .(sampleID=ID, bamFile=FILE_PATH)])
setcolorder(colData, unique(c("sampleID", "STRAND", "PAIRED_END", "bamFile"), colnames(annoSub)))
Dataset: all
Final sample table all
DT::datatable(finalTable, options=list(scrollX=TRUE))
dim(finalTable)
## [1] 100 20
write_tsv(finalTable, file=outFile)
IyctLS0KIycgdGl0bGU6IENyZWF0ZSBkYXRhc2V0cyBmcm9tIGFubm90YXRpb24gZmlsZQojJyBhdXRob3I6IENocmlzdGlhbiBNZXJ0ZXMsIG11bWljaGFlCiMnIHdiOgojJyAgbG9nOgojJyAgICAtIHNuYWtlbWFrZTogJ2BzbSBzdHIodG1wX2RpciAvICJBUyIgLyAie2RhdGFzZXR9IiAvICIwMF9kZWZpbmVEYXRhc2V0LlJkcyIpYCcKIycgIHBhcmFtczoKIycgICAgLSBzZXR1cDogJ2BzbSBjZmcuQVMuZ2V0V29ya2RpcigpICsgIi9jb25maWcuUiJgJwojJyAgICAtIGlkczogJ2BzbSBsYW1iZGEgdzogc2EuZ2V0SURzQnlHcm91cCh3LmRhdGFzZXQsIGFzc2F5PSJSTkEiKWAnCiMnICAgIC0gZmlsZU1hcHBpbmdGaWxlOiAnYHNtIGNmZy5nZXRSb290KCkgKyAiL2ZpbGVfbWFwcGluZy5jc3YiYCcKIycgIGlucHV0OgojJyAgICAtIHNhbXBsZUFubm9GaWxlOiAnYHNtIGNvbmZpZ1sic2FtcGxlQW5ub3RhdGlvbiJdYCcKIycgIG91dHB1dDoKIycgICAgLSBjb2xEY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