view oncocircos.xml @ 10:417f984cd2e2 draft default tip

Uploaded
author morinlab
date Wed, 30 Nov 2016 13:41:12 -0500
parents 55571b9980b0
children
line wrap: on
line source

<tool id="oncocircos" name="Oncocircos" version="0.69">

  <description>
    creates a genome-centric visualization of SNV and CNV Data
  </description>

  <requirements>
    <requirement type="package" version="0.69">circos_perl_environment</requirement>
    <requirement type="package" version="0.69">circos</requirement>
  </requirements>


  <command error_checking="aggressive">

  mkdir data;
  mkdir circos;
  mkdir circos/data;
  mkdir circos/etc;

  touch data/cnv.large.scale.txt;
  cat $sig_regions >> data/cnv.large.scale.txt;
  touch data/genes_to_label.txt;
  #if $advancedOptions.gene_label_input_type.gene_label_input_type_selector.value == "other":
    echo $advancedOptions.gene_label_input_type.gene > data/genes_to_label.txt;
  #else:
    cat $advancedOptions.gene_label_input_type.gene_file > data/genes_to_label.txt;
  #end if

  touch data/genes_to_hide.txt;
  #if $advancedOptions.gene_mask_input_type.gene_mask_input_type_selector.value == "other":
      echo $advancedOptions.gene_mask_input_type.gene > data/genes_to_hide.txt;
  #else:
      cat $advancedOptions.gene_mask_input_type.gene_file > data/genes_to_hide.txt;
  #end if
      
  cp $__tool_directory__/etc/* circos/etc/;

  mkdir etc;
  
  ln -s $input_maf data/snv.txt;
  ln -s $input_seg data/cnv.txt;  
  ln -s $biomart data/biomart.txt;
  cat $__tool_directory__/parse.conf

  #if $advancedOptions.filter_snvs != 1:
    | sed 's/^SNV_FILTER$/sv = yes/g'
    | sed 's/^SNV_FILTER_NUM$/sv_num = $advancedOptions.filter_snvs/g'
  #else:
    | sed 's/^SNV_FILTER$/sv = yes/g'
    | sed 's/^SNV_FILTER_NUM$/sv_num = $advancedOptions.filter_snvs/g'
  #end if
  
  #if $advancedOptions.chromosome != "":
    | sed 's/^CHR$/chr = $advancedOptions.chromosome/g'
  #else:
    | sed 's/^CHR$//g'
  #end if
  

  | sed "s#^ROOT#root = \$(pwd)#g"  
  | sed 's#^CIRCOS#circos = circos/data#g'

  > ./etc/parse.conf;

  perl $__tool_directory__/bin/parse --conf ./etc/parse.conf | perl $__tool_directory__/bin/make.circos.data --conf ./etc/parse.conf;

  circos --conf ./circos/etc/circos.conf;

  cp circos.png $png;
  cp circos.svg $svg;
  cp ./etc/parse.conf $tmp;

  </command>

  <inputs>
    <param type="data" format="maf" name="input_maf" label="Cohort Wide MAF File"/>
    <param type="data" format="segs" name="input_seg" label="Cohort Wide SEGS File"/>
    <param type="data" format="" name="biomart" label="Biomart File listing all genes (format: ENSG, chrom, start, end, Symbol"/>
    <param type="data" format="bed" name="sig_regions" label="Regions of recurrent copy number gain/loss in bed format. 4th column must indicate the event type (e.g gain, hetd)" optional="true"/>
    <section name="advancedOptions">
      <param type="integer" name="filter_snvs" 
             min="1" value="1" max="100" 
             label="Filter genes with a cohort wide snv tally below this value"/>
      <param type="text" name="chromosome" value="" 
             label="Restrict plot to the following chromosome"/>
      <conditional name="gene_label_input_type">
	<param name="gene_label_input_type_selector" type="select" label="How will you supply genes of interest to label in the plot?">
	  <option value="file" selected="True">Gene File</option>
	  <option value="other">Other</option>
	</param>
	<when value="file">
	  <param name="gene_file" type="data" format="txt" label="Gene File"  help="list of genes separated by newlines" />
	</when>
	<when value="other">
	  <param name="gene" type="text" value="TP53" label="Gene" help="type the single gene" />
	</when>
      </conditional>
      <conditional name="gene_mask_input_type">
	<param name="gene_mask_input_type_selector" type="select" label="How will you supply blacklist genes to hide from plot?">
	  <option value="file" selected="True">Gene Blacklist File</option>
	  <option value="other">Other</option>
	</param>
	<when value="file">
	  <param name="gene_file" type="data" format="txt" label="Gene File"  help="list of genes separated by newlines" />
	</when>
	<when value="other">
	  <param name="gene" type="text" value="TP53" label="Gene" help="type the single gene" />
	</when>
      </conditional>
    </section>
  </inputs>
  <outputs>
    <data format="png" name="png" />
    <data format="svg" name="svg" />
    <data format="txt" name="tmp" />
  </outputs>
  <citations>
    <citation type="bibtex">
      @article {Albuquerque089631,
      author = {Albuquerque, Marco A and Grande, Bruno M and Ritch, Elie and Jessa, Selin and Krzywinski, Martin I and Grewal, Jasleen and Shah, Sohrab and Boutros, Paul and Morin, Ryan},
      title = {Enhancing Knowledge Discovery from Cancer Genomics Data with Galaxy},
      year = {2016},
      doi = {10.1101/089631},
      publisher = {Cold Spring Harbor Labs Journals},
      URL = {http://biorxiv.org/content/early/2016/11/26/089631},
      eprint = {http://biorxiv.org/content/early/2016/11/26/089631.full.pdf},
      journal = {bioRxiv}
      }

    </citation>
    <citation type="bibtex">
      @misc{
      goecks2010galaxy,
      title={Galaxy: a comprehensive approach for supporting accessible, reproducible, and transparent computational research in the life sciences},
      author={Goecks, Jeremy and Nekrutenko, Anton and Taylor, James and others},
      journal={Genome Biol},
      volume={11},
      number={8},
      pages={R86},
      year={2010}
      }
    </citation>
    <citation type="bibtex">

      @ARTICLE{Krzywinski2009-hn,
      title       = "Circos: an information aesthetic for comparative genomics",
      author      = "Krzywinski, Martin and Schein, Jacqueline and Birol, Inan\c{c}
      and Connors, Joseph and Gascoyne, Randy and Horsman, Doug and
      Jones, Steven J and Marra, Marco A",
      affiliation = "Canada's Michael Smith Genome Sciences Center, Vancouver,
      British Columbia V5Z 4S6, Canada. martink@bcgsc.ca",
      abstract    = "We created a visualization tool called Circos to facilitate
      the identification and analysis of similarities and
      differences arising from comparisons of genomes. Our tool is
      effective in displaying variation in genome structure and,
      generally, any other kind of positional relationships between
      genomic intervals. Such data are routinely produced by
      sequence alignments, hybridization arrays, genome mapping, and
      genotyping studies. Circos uses a circular ideogram layout to
      facilitate the display of relationships between pairs of
      positions by the use of ribbons, which encode the position,
      size, and orientation of related genomic elements. Circos is
      capable of displaying data as scatter, line, and histogram
      plots, heat maps, tiles, connectors, and text. Bitmap or
      vector images can be created from GFF-style data inputs and
      hierarchical configuration files, which can be easily
      generated by automated tools, making Circos suitable for rapid
      deployment in data analysis and reporting pipelines.",
      journal     = "Genome Res.",
      volume      =  19,
      number      =  9,
      pages       = "1639--1645",
      month       =  sep,
      year        =  2009,
      language    = "en"
      }

      
    </citation>
  </citations>
</tool>