comparison get_deseq_dataset.R @ 20:89d26b11d452 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/deseq2 commit 82fc6e1098b8af8b769ff07689704c5275b76459
author iuc
date Thu, 06 Dec 2018 15:49:22 -0500
parents c56e0689e46e
children 0696db066a5b
comparison
equal deleted inserted replaced
19:c56e0689e46e 20:89d26b11d452
55 suppressPackageStartupMessages({ 55 suppressPackageStartupMessages({
56 library("GenomicFeatures") 56 library("GenomicFeatures")
57 }) 57 })
58 txdb <- makeTxDbFromGFF(gffFile) 58 txdb <- makeTxDbFromGFF(gffFile)
59 k <- keys(txdb, keytype = "TXNAME") 59 k <- keys(txdb, keytype = "TXNAME")
60 tx2gene <- select(txdb, k, "GENEID", "TXNAME") 60 tx2gene <- select(txdb, keys=k, columns="GENEID", keytype="TXNAME")
61 # Remove 'transcript:' from transcript IDs (when gffFile is a GFF3 from Ensembl and the transcript does not have a Name)
62 tx2gene$TXNAME <- sub('^transcript:', '', tx2gene$TXNAME)
61 } 63 }
62 try(txi <- tximport(txiFiles, type=txtype, tx2gene=tx2gene)) 64 try(txi <- tximport(txiFiles, type=txtype, tx2gene=tx2gene))
63 if (!exists("txi")) { 65 if (!exists("txi")) {
64 # Remove version from transcript IDs 66 # Remove version from transcript IDs in tx2gene...
65 tx2gene$TXNAME <- sub('\\.[0-9]+', '', tx2gene$TXNAME) 67 tx2gene$TXNAME <- sub('\\.[0-9]+$', '', tx2gene$TXNAME)
66 txi <- tximport(txiFiles, type=txtype, tx2gene=tx2gene) 68 # ...and in txiFiles
69 txi <- tximport(txiFiles, type=txtype, tx2gene=tx2gene, ignoreTxVersion=TRUE)
67 } 70 }
68 dds <- DESeqDataSetFromTximport(txi, 71 dds <- DESeqDataSetFromTximport(txi,
69 subset(sampleTable, select=-c(filename)), 72 subset(sampleTable, select=-c(filename)),
70 designFormula) 73 designFormula)
71 } 74 }