Class: Bio::Ngs::Cufflinks::Diff
- Inherits:
-
Object
- Object
- Bio::Ngs::Cufflinks::Diff
- Includes:
- Command::Wrapper, Utils
- Defined in:
- lib/bio/appl/ngs/cufflinks.rb
Overview
cuffdiff v1.3.0 (3022)
Usage: cuffdiff [options] <transcripts.gtf> <sample1_hits.sam> <sample2_hits.sam> [… sampleN_hits.sam]
Supply replicate SAMs as comma separated lists for each condition: sample1_rep1.sam,sample1_rep2.sam,...sample1_repM.sam
General Options:
-o/--output-dir write all output files to this directory [ default: ./ ]
--seed value of random number generator seed [ default: 0 ]
-T/--time-series treat samples as a time-series [ default: FALSE ]
-c/--min-alignment-count minimum number of alignments in a locus for testing [ default: 10 ]
--FDR False discovery rate used in testing [ default: 0.05 ]
-M/--mask-file ignore all alignment within transcripts in this file [ default: NULL ]
-b/--frag-bias-correct use bias correction - reference fasta required [ default: NULL ]
-u/--multi-read-correct use 'rescue method' for multi-reads (more accurate) [ default: FALSE ]
-N/--upper-quartile-norm use upper-quartile normalization [ default: FALSE ]
-L/--labels comma-separated list of condition labels
-p/--num-threads number of threads used during quantification [ default: 1 ]
Advanced Options:
--library-type Library prep used for input reads [ default: below ]
-m/--frag-len-mean average fragment length (unpaired reads only) [ default: 200 ]
-s/--frag-len-std-dev fragment length std deviation (unpaired reads only) [ default: 80 ]
--num-importance-samples number of importance samples for MAP restimation [ default: 1000 ]
--num-bootstrap-samples Number of bootstrap replications [ default: 20 ]
--bootstrap-fraction Fraction of fragments in each bootstrap sample [ default: 1.0 ]
--max-mle-iterations maximum iterations allowed for MLE calculation [ default: 5000 ]
--compatible-hits-norm count hits compatible with reference RNAs only [ default: TRUE ]
--total-hits-norm count all hits for normalization [ default: FALSE ]
--poisson-dispersion Don't fit fragment counts for overdispersion [ default: FALSE ]
-v/--verbose log-friendly verbose processing (no progress bar) [ default: FALSE ]
-q/--quiet log-friendly quiet processing (no progress bar) [ default: FALSE ]
--no-update-check do not contact server to check for update availability[ default: FALSE ]
--emit-count-tables print count tables used to fit overdispersion [ default: FALSE ]
--max-bundle-frags maximum fragments allowed in a bundle before skipping [ default: 500000 ]
Debugging use only:
--read-skip-fraction Skip a random subset of reads this size [ default: 0.0 ]
--no-read-pairs Break all read pairs [ default: FALSE ]
--trim-read-length Trim reads to be this long (keep 5' end) [ default: none ]
--cov-delta Maximum gap between bootstrap and IS [ default: 2.0 ]
Supported library types:
ff-firststrand
ff-secondstrand
ff-unstranded
fr-firststrand
fr-secondstrand
fr-unstranded (default)
transfrags
Class Method Summary collapse
-
.genes(diff, gtf, options = {}) ⇒ Object
write a file with the information See process_de for options available Example: Bio::Ngs::Cufflinks::Diff.genes(“/Users/bonnalraoul/Desktop/RRep16giugno/DEPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/gene_exp.diff”, “/Users/bonnalraoul/Desktop/RRep16giugno/COMPARE_PopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/ComparepPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8.combined.gtf”, fold:0.5,min_samples:5,min_fpkm:0.5,z_scores:true, :regulated=>:up).
-
.isoforms(diff, gtf, options = {}) ⇒ Object
write a file with the information See process_de for options available Example: Bio::Ngs::Cufflinks::Diff.isoforms(“/Users/bonnalraoul/Desktop/RRep16giugno/DEPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/isoform_exp.diff”, “/Users/bonnalraoul/Desktop/RRep16giugno/COMPARE_PopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/ComparepPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8.combined.gtf”, fold:0.5,min_samples:5,min_fpkm:0.5,z_scores:true, :regulated=>:up).
- .offset_by_version(cufflinks_version) ⇒ Object
-
.version(diff) ⇒ Object
Return the version of CuffDiff used to produce the output.
Methods included from Utils
Methods included from Command::Wrapper
#class_name, #default_options, included, #initialize, #normalize_params, #options, #options=, #output, #params, #params=, #path, #path=, #pipe_ahead, #pipe_ahead=, #pipe_ahead?, #program, #reset_params, #run, #sub_program, #thor_task, #to_cmd_ary, #use_aliases?
Class Method Details
.genes(diff, gtf, options = {}) ⇒ Object
write a file with the information See process_de for options available Example: Bio::Ngs::Cufflinks::Diff.genes(“/Users/bonnalraoul/Desktop/RRep16giugno/DEPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/gene_exp.diff”, “/Users/bonnalraoul/Desktop/RRep16giugno/COMPARE_PopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/ComparepPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8.combined.gtf”, fold:0.5,min_samples:5,min_fpkm:0.5,z_scores:true, :regulated=>:up)
299 300 301 302 303 304 305 306 307 |
# File 'lib/bio/appl/ngs/cufflinks.rb', line 299 def genes(diff, gtf, ={}) process_de(diff, gtf, ) do |dict_info, diff_reference, gtf_kb, fpkm_values| # puts diff_reference # puts fpkm_values # "#{dict_info[:winner].first}\t#{gtf_kb[diff_reference][:gene_name]}\t#{fpkm_values.join("\t")}" #do not use th gtf kb "#{dict_info[:winner].first}\t#{dict_info[:gene_name]}\t#{fpkm_values.join("\t")}" end end |
.isoforms(diff, gtf, options = {}) ⇒ Object
write a file with the information See process_de for options available Example: Bio::Ngs::Cufflinks::Diff.isoforms(“/Users/bonnalraoul/Desktop/RRep16giugno/DEPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/isoform_exp.diff”, “/Users/bonnalraoul/Desktop/RRep16giugno/COMPARE_PopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8/ComparepPopNormNOTh2s1NOTh17s1_lane1-2-3-4-6-8.combined.gtf”, fold:0.5,min_samples:5,min_fpkm:0.5,z_scores:true, :regulated=>:up)
288 289 290 291 292 |
# File 'lib/bio/appl/ngs/cufflinks.rb', line 288 def isoforms(diff, gtf, ={}) process_de(diff, gtf, ) do |dict_info, diff_reference, gtf_kb, fpkm_values| "#{dict_info[:winner].first}\t#{gtf_kb[diff_reference][:nearest_ref]}_#{gtf_kb[diff_reference][:gene_name]}\t#{fpkm_values.join("\t")}" end end |
.offset_by_version(cufflinks_version) ⇒ Object
274 275 276 277 278 279 280 281 |
# File 'lib/bio/appl/ngs/cufflinks.rb', line 274 def offset_by_version(cufflinks_version) case cufflinks_version when "0.9.X" 0 when "1.0.X" 1 end end |
.version(diff) ⇒ Object
Return the version of CuffDiff used to produce the output
260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/bio/appl/ngs/cufflinks.rb', line 260 def version(diff) #cufflink_version_offset = Bio::Ngs::Cufflinks.version f=File.open(diff,'r') header=f.readline #skip header f.close cufflink_version_offset = case header.split.size when 12 "0.9.X" when 14 Bio::Ngs::Cufflinks.version #latest end end |