Procházet zdrojové kódy

add --strandSpecific

Zhang Xudong před 3 roky
rodič
revize
111b1ed2f1
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      run-featurecounts.R

+ 2 - 1
run-featurecounts.R

@@ -10,6 +10,7 @@ p <- add_argument(p, "--gtf", help="input: gtf file", type="character")
 p <- add_argument(p, "--featureType", help="a character string or a vector of character strings giving the feature type or types used to select rows in the GTF annotation which will be used for read summarization", type="character", default="exon")
 p <- add_argument(p, "--attrType", help="a character string giving the attribute type in the GTF annotation which will be used to group features (eg. exons) into meta-features", type="character", default="gene_id")
 p <- add_argument(p, "--isPairedEnd", help="indicating whether libraries contain paired-end reads or not", type="logical", default=TRUE)
+p <- add_argument(p, "--strandSpecific", help="0 (unstranded), 1 (stranded) and 2 (reversely stranded)", type="numeric", default=0)
 p <- add_argument(p, "--output", help="output prefix", type="character")
 
 # Parse the command line arguments
@@ -27,7 +28,7 @@ outFilePref <- argv$output
 outStatsFilePath  <- paste(outFilePref, '.log',  sep = ''); 
 outCountsFilePath <- paste(outFilePref, '.count', sep = ''); 
 
-fCountsList = featureCounts(bamFile, annot.ext=gtfFile, isGTFAnnotationFile=TRUE, nthreads=nthreads, GTF.featureType=argv$featureType, GTF.attrType=argv$attrType, isPairedEnd=argv$isPairedEnd)
+fCountsList = featureCounts(bamFile, annot.ext=gtfFile, isGTFAnnotationFile=TRUE, nthreads=nthreads, GTF.featureType=argv$featureType, GTF.attrType=argv$attrType, isPairedEnd=argv$isPairedEnd, strandSpecific=argv$strandSpecific)
 dgeList = DGEList(counts=fCountsList$counts, genes=fCountsList$annotation)
 fpkm = rpkm(dgeList, dgeList$genes$Length)
 tpm = exp(log(fpkm) - log(sum(fpkm)) + log(1e6))