X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=rsem-calculate-expression;h=2902239eff0513a186c2fc562d8541c99b578a62;hb=635ca2939cfb1f519f19e9dec072ddd05e9fb450;hp=d50a6c2ed9d3997da7a9b54c9a4f54ff5c0512d3;hpb=0a534802ee9fa3d488995a68621ff04f0fc6be7f;p=rsem.git diff --git a/rsem-calculate-expression b/rsem-calculate-expression index d50a6c2..2902239 100755 --- a/rsem-calculate-expression +++ b/rsem-calculate-expression @@ -8,7 +8,7 @@ use strict; #const my $BURNIN = 200; -my $CHAINLEN = 1000; +my $NCV = 1000; my $SAMPLEGAP = 1; my $CONFIDENCE = 0.95; my $NSPC = 50; @@ -208,7 +208,7 @@ if (!$is_sam && !$is_bam) { $command .= " -1 $mate1_list -2 $mate2_list"; } - $command .= " | gzip > $imdName.sam.gz"; + $command .= " | gzip > $sampleName.sam.gz"; if ($mTime) { $time_start = time(); } @@ -216,7 +216,7 @@ if (!$is_sam && !$is_bam) { if ($mTime) { $time_end = time(); $time_alignment = $time_end - $time_start; } - $inpF = "$imdName.sam.gz"; + $inpF = "$sampleName.sam.gz"; $is_sam = 1; # output of bowtie is a sam file } @@ -291,8 +291,8 @@ if ($mTime) { $time_end = time(); $time_rsem = $time_end - $time_start; } if ($mTime) { $time_start = time(); } if ($calcCI) { - $command = $dir."rsem-run-gibbs $refName $sampleName $sampleToken $BURNIN $CHAINLEN $SAMPLEGAP"; -# $command .= " -p $nThreads"; + $command = $dir."rsem-run-gibbs $refName $sampleName $sampleToken $BURNIN $NCV $SAMPLEGAP"; + $command .= " -p $nThreads"; if ($quiet) { $command .= " -q"; } &runCommand($command); @@ -301,7 +301,8 @@ if ($calcCI) { &collectResults("$imdName.iso_res", "$sampleName.isoforms.results"); # isoform level &collectResults("$imdName.gene_res", "$sampleName.genes.results"); # gene level - $command = $dir."rsem-calculate-credibility-intervals $refName $sampleName $sampleToken $CONFIDENCE $NSPC $NMB"; + $command = $dir."rsem-calculate-credibility-intervals $refName $sampleName $sampleToken $CONFIDENCE $NCV $NSPC $NMB"; + $command .= " -p $nThreads"; if ($quiet) { $command .= " -q"; } &runCommand($command); @@ -323,11 +324,11 @@ if ($mTime) { $time_end = time(); } if ($mTime) { open(OUTPUT, ">$sampleName.time"); - print OUTPUT "Alignment: $time_alignment s.\n"; - print OUTPUT "RSEM: $time_rsem s.\n"; - print OUTPUT "CI: $time_ci s.\n"; + print OUTPUT "Aligning reads: $time_alignment s.\n"; + print OUTPUT "Estimating expression levels: $time_rsem s.\n"; + print OUTPUT "Calculating credibility intervals: $time_ci s.\n"; my $time_del = $time_end - $time_start; - print OUTPUT "Delete: $time_del s.\n"; +# print OUTPUT "Delete: $time_del s.\n"; close(OUTPUT); } @@ -469,7 +470,7 @@ Generate a BAM file, 'sample_name.genome.bam', with alignments mapped to genomic =item B<--sampling-for-bam> When RSEM generates a BAM file, instead of outputing all alignments a read has with their posterior probabilities, one alignment is sampled and outputed according to the posterior probabilities. If the sampling result is that the read comes from the "noise" transcript, nothing is outputed. (Default: off) - + =item B<--calc-ci> Calculate 95% credibility intervals and posterior mean estimates. (Default: off) @@ -550,6 +551,10 @@ Amount of memory (in MB) RSEM is allowed to use for computing credibility interv Keep temporary files generated by RSEM. RSEM creates a temporary directory, 'sample_name.temp', into which it puts all intermediate output files. If this directory already exists, RSEM overwrites all files generated by previous RSEM runs inside of it. By default, after RSEM finishes, the temporary directory is deleted. Set this option to prevent the deletion of this directory and the intermediate files inside of it. (Default: off) +=item B<--time> + +Output time consumed by each step of RSEM to 'sample_name.time'. (Default: off) + =item B<-q/--quiet> Suppress the output of logging information. (Default: off) @@ -647,6 +652,18 @@ indicating the strand of the transcript it aligns to. 'sample_name.genome.sorted.bam' and 'sample_name.genome.sorted.bam.bai' are the sorted BAM file and indices generated by samtools (included in RSEM package). +=item B + +Only generated when the input files are raw reads instead of SAM/BAM format files + +It is the gzipped SAM output produced by bowtie aligner. + +=item B + +Only generated when --time is specified. + +It contains time (in seconds) consumed by aligning reads, estimating expression levels and calculating credibility intervals. + =item B This is a folder instead of a file. All model related statistics are stored in this folder. Use 'rsem-plot-model' can generate plots using this folder.