mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Adding test tool
This commit is contained in:
committed by
mvdbeek
parent
986379fd0d
commit
9d98f10767
@@ -741,7 +741,7 @@ class VcfGz( BaseVcf, binary.Binary):
|
||||
extension = 'vcf.gz'
|
||||
compressed = True
|
||||
|
||||
MetadataElement( name="vcf_gz_index", desc="Vcf Index File", param=metadata.FileParameter, file_ext="tbi", readonly=True, no_value=None, visible=False, optional=True )
|
||||
MetadataElement( name="tabix_index", desc="Vcf Index File", param=metadata.FileParameter, file_ext="tbi", readonly=True, no_value=None, visible=False, optional=True )
|
||||
|
||||
def set_meta( self, dataset, **kwd ):
|
||||
super(BaseVcf, self).set_meta(dataset, **kwd)
|
||||
@@ -749,7 +749,7 @@ class VcfGz( BaseVcf, binary.Binary):
|
||||
# These metadata values are not accessible by users, always overwrite
|
||||
index_file = dataset.metadata.bcf_index
|
||||
if not index_file:
|
||||
index_file = dataset.metadata.spec['vcf_gz_index'].param.new_file( dataset=dataset )
|
||||
index_file = dataset.metadata.spec['tabix_index'].param.new_file( dataset=dataset )
|
||||
# Create the bcf index
|
||||
# $ bcftools index
|
||||
# Usage: bcftools index <in.bcf>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<tool file="composite_output.xml" />
|
||||
<tool file="composite_output_tests.xml" />
|
||||
<tool file="unicode_stream.xml" />
|
||||
<tool file="vcf_bgzip.xml" />
|
||||
<tool file="metadata.xml" />
|
||||
<tool file="metadata_bam.xml" />
|
||||
<tool file="metadata_bcf.xml" />
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<tool id="vcf_bgzip_test" name="vcf_bgzip_test" version="0.1.0">
|
||||
<requirements>
|
||||
<requirement type="package" version="1.4">bcftools</requirement>
|
||||
</requirements>
|
||||
<command detect_errors="exit_code"><![CDATA[
|
||||
ln -s $input input.vcf.gz &&
|
||||
tabix -p vcf input.vcf.gz &&
|
||||
md5sum input.vcf.gz.tbi > input.vcf.gz.tbi.md5 &&
|
||||
cp $input.metadata.vcf_gz_index input.vcf.gz.tbi &&
|
||||
md5check -c vcf.gz.tbi.md5 &&
|
||||
cp $input $output
|
||||
]]></command>
|
||||
<inputs>
|
||||
<param name="input" format="vcf_bgzip" type="data" label="Source file"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data format="data" ftype="vcf_bgzip" name="output" />
|
||||
</outputs>
|
||||
<tests>
|
||||
<test>
|
||||
<param name="input" ftype="vcf_bgzip" value="test.vcf.gz"/>
|
||||
<output name="output" file="test.vcf.gz"/>
|
||||
</test>
|
||||
</tests>
|
||||
<help><![CDATA[
|
||||
This is a help text
|
||||
]]></help>
|
||||
<citations>
|
||||
</citations>
|
||||
</tool>
|
||||
Reference in New Issue
Block a user