view geneiobio-iframe.xml @ 1:fc53fcdbe548 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/geneiobio commit fab39612473d91e048868d9c122d7dd61a2bd9d4
author iuc
date Mon, 24 Jul 2023 16:06:54 +0000
parents c0af7b196a89
children
line wrap: on
line source

<tool id="gene_iobio_display_generation_iframe" name="gene.iobio visualisation" version="4.7.1+galaxy1">
	<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>
		<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_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_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_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.
	
	.. 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>