Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new tool gene.iobio #5365

Merged
merged 12 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tools/geneiobio/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: geneiobio
owner: iuc
categories:
- Sequence Analysis
description: Gene.iobio is an interactive tool for variant and trio analysis.
long_description: |
Gene.iobio is an interactive tool for variant and trio analysis.
remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/tools/geneiobio
homepage_url: https://github.com/iobio/gene.iobio
type: unrestricted
169 changes: 169 additions & 0 deletions tools/geneiobio/geneiobio-iframe.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<tool id="gene_iobio_display_generation_iframe" name="gene.iobio visualisation" version="4.7.1">
<description>analyses VCFs for single and trio analysis to find causative variants using gene.iobio's public server</description>
<command>cat '$index' | tr -d '\n' > '$outfile'</command>
<configfiles>
hexylena marked this conversation as resolved.
Show resolved Hide resolved
<configfile name="index"><![CDATA[
<html>
<body>
<iframe src="https://gene.iobio.io/?genes=${genes}
&species=Human
&build=${refgen_version}
&affectedSibs=
&unaffectedSibs=
&rel0=proband
&sex0=${proband_sex}
&vcf0=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($proband_vcf.id)}/display
&tbi0=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($proband_vcf.id)}/metadata_file%3Fmetadata_file%3Dtabix_index
#if $proband_bam.ext == 'bam':
&bam0=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($proband_bam.id)}/display
&bai0=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($proband_bam.id)}/metadata_file%3Fmetadata_file%3Dbam_index
#elif $proband_bam.ext == 'cram':
&cram0=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($proband_bam.id)}/display
&cai0=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($proband_bam.id)}/metadata_file%3Fmetadata_file%3Dcram_index
#end if
&sample0=${proband_name}
&affectedStatus0=${proband_affected}
#if str( $input_type.input_type_selector ) == "trio"#
&rel1=father
&sex1=male
&vcf1=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.father.vcf.id)}/display
&tbi1=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.father.vcf.id)}/metadata_file%3Fmetadata_file%3Dtabix_index
#if $input_type.father.bam.ext == 'bam':
&bam1=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.father.bam.id)}/display
&bai1=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.father.bam.id)}/metadata_file%3Fmetadata_file%3Dbam_index
#elif $input_type.father.bam.ext == 'cram':
&cram1=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.father.bam.id)}/display
&cai1=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.father.bam.id)}/metadata_file%3Fmetadata_file%3Dcram_index
#end if
&sample1=${input_type.father.name}
&affectedStatus1=${input_type.father.affected}
&rel2=mother
&sex2=female
&vcf2=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.mother.vcf.id)}/display
&tbi2=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.mother.vcf.id)}/metadata_file%3Fmetadata_file%3Dtabix_index
#if $input_type.mother.bam.ext == 'bam':
&bam2=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.mother.bam.id)}/display
&bai2=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.mother.bam.id)}/metadata_file%3Fmetadata_file%3Dbam_index
#elif $input_type.mother.bam.ext == 'cram':
&cram2=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.mother.bam.id)}/display
&cai2=${__app__.config.galaxy_infrastructure_url}/api/datasets/${__app__.security.encode_id($input_type.mother.bam.id)}/metadata_file%3Fmetadata_file%3Dcram_index
#end if
&sample2=${input_type.mother.name}
&affectedStatus2=${input_type.mother.affected}
#end if
" style="width: 100%; height: 900px;"></iframe>
</body></html>
]]></configfile>
</configfiles>
<inputs>
<param name="proband_vcf" type="data" format="vcf,vcf_bgzip" label="Proband VCF file"/>
<param name="proband_bam" type="data" format="bam,cram" label="Proband BAM file" optional="true"/>
<param name="proband_sex" type="select" display="radio" label="Proband sex">
<option value="male" selected="true">Male</option>
<option value="female">Female</option>
</param>
<param name="proband_affected" type="boolean" truevalue="affected" falsevalue="unaffected" checked="true" label="Is the proband affected?"/>
<param name="proband_name" type="text" value="C" label="Proband sample name" help="The sample names are listed in the columns of the VCF."/>
<conditional name="input_type">
<param name="input_type_selector" type="select" display="radio" label="Single/Trio analysis">
<option value="single" selected="true">Single</option>
<option value="trio">Trio</option>
</param>
<when value="trio">
<section name="father" title="Father input">
<param name="vcf" type="data" format="vcf,vcf_bgzip" label="Father VCF file"/>
<param name="bam" type="data" format="bam,cram" label="Father BAM file" optional="true"/>
<param name="affected" type="boolean" truevalue="affected" falsevalue="unaffected" checked="false" label="Is the father affected?"/>
<param name="name" type="text" value="F" label="Father sample name" help="The sample names are listed in the columns of the VCF."/>
</section>
<section name="mother" title="Mother input">
<param name="vcf" type="data" format="vcf,vcf_bgzip" label="Mother VCF file"/>
<param name="bam" type="data" format="bam,cram" label="Mother BAM file" optional="true"/>
<param name="affected" type="boolean" truevalue="affected" falsevalue="unaffected" checked="false" label="Is the mother affected?"/>
<param name="name" type="text" value="M" label="Mother sample name" help="The sample names are listed in the columns of the VCF."/>
</section>
</when>
<when value="single">
</when>
</conditional>
<param name="genes" type="text" value="PDHA1,ARHGAP8,RAI1,PLXNA1,SCN8A,SMARCA2" size="100x5" label="Genes of interest" help="Provide the genes as a comma seperated line. This line can be empty and genes can be selected interactively using gene.iobio."/>
<param name="refgen_version" type="select" label="Select reference genome version">
<option value="GRCh38" selected="true">GRCh38</option>
<option value="GRCh37">GRCh37</option>
</param>
</inputs>
<outputs>
<data name="outfile" format="html" />
</outputs>
<tests>
<!-- Test 1 - Single -->
<test expect_num_outputs="1">
<param name="proband_vcf" ftype="vcf" value="family.vcf.gz"/>
<param name="proband_bam" ftype="bam" value="proband.bam" />
<param name="proband_sex" ftype="text" value="female" />
<param name="proband_name" ftype="text" value="Case5C" />
<param name="genes" ftype="text" value="BRCA1" />
<param name="refgen_version" ftype="text" value="GRCh37" />
<output name="outfile">
<assert_contents>
<has_size value= "659" delta="100" />
</assert_contents>
</output>
</test>
<!-- Test 2 - Trio -->
<test expect_num_outputs="1">
<param name="proband_vcf" ftype="vcf" value="family.vcf.gz"/>
<param name="proband_bam" ftype="bam" value="proband.bam" />
<param name="proband_sex" ftype="text" value="female" />
<param name="proband_name" ftype="text" value="Case5C" />
<param name="genes" ftype="text" value="BRCA1" />
<param name="refgen_version" ftype="text" value="GRCh37" />
<conditional name="input_type">
<param name="input_type_selector" value="trio"/>
<section name="mother">
<param name="vcf" ftype="vcf" value="family.vcf.gz"/>
<param name="bam" ftype="bam" value="mother.bam" />
<param name="affected" ftype="text" value="affected" />
<param name="name" ftype="text" value="Case5M" />
</section>
<section name="father">
<param name="vcf" ftype="vcf" value="family.vcf.gz"/>
<param name="bam" ftype="bam" value="father.bam" />
<param name="affected" ftype="text" value="unaffected" />
<param name="name" ftype="text" value="Case5F" />
</section>
</conditional>
<output name="outfile">
<assert_contents>
<has_size value= "1555" delta="500" />
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Gene.iobio provides a report of impactful variants. Gene.iobio also helps prioritize variants based on multiple integrated gene:disease association algorithms and knowledge bases.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should be very clear that data is transferred to their servers, since maybe with an iframe it isn't immediately obvious. We could add a warning in the help text

.. class:: Warning mark

This transfers data to a remote server, in US jurisdiction

(with the correct indentation of course)

alternatively maybe that could be a mandatory checkbox that the user has to check to acknowledge? I just worry with such a useful tool for human data someone makes a mistake a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in order to use the tool you'd need to make the history public right? I would say that's quite clear, but indeed we'll need to mention it here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's true, we don't mention that somewhere, we should mention that as well.


.. class:: Warning mark

This transfers data to a remote server, in US jurisdiction. In order to do this make sure to make the history accessible, i.e. anyone with a link can reach the data.

Required inputs:

1. Proband VCF file

Optional inputs (trio analysis):

1. Proband BAM file
2. Father & Mother BAM file
3. Father & Mother VCF file

The `iobio project`_ is developed by the `Marth lab`_ at the `University of Utah Center for Genetic Discovery`_.

.. _iobio project: https://iobio.io
.. _Marth lab: https://marthlab.org/
.. _University of Utah Center for Genetic Discovery: https://ucgd.genetics.utah.edu/
]]></help>
<citations>
<citation type="doi">10.1038/s41598-021-99752-5</citation>
</citations>
</tool>
Binary file added tools/geneiobio/test-data/family.vcf.gz
Binary file not shown.
Binary file added tools/geneiobio/test-data/father.bam
Binary file not shown.
Binary file added tools/geneiobio/test-data/mother.bam
Binary file not shown.
Binary file added tools/geneiobio/test-data/proband.bam
Binary file not shown.