Skip to content

Commit

Permalink
Fixed the unexpected behaviour due to --assembly parameter of `pair…
Browse files Browse the repository at this point in the history
…tools parse` (galaxyproject#5953)

* Fixed Label Swapping issue

* Debugging of --assembly name parameter

* Eliminated conditional for assembly

* Added a test for assembly name

* Version bump for parse
  • Loading branch information
SaimMomin12 authored Apr 16, 2024
1 parent eecd43b commit edb9fd7
Show file tree
Hide file tree
Showing 2 changed files with 615 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tools/pairtools/parse.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="pairtools_parse" name="Pairtools parse" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="23.2" license="MIT">
<tool id="pairtools_parse" name="Pairtools parse" version="@TOOL_VERSION@+galaxy1" profile="23.2" license="MIT">
<description>Find ligation pairs in alignments and create pairs.</description>
<macros>
<import>macros.xml</import>
Expand All @@ -8,7 +8,9 @@
pairtools parse
'$sam_path'
-c '$chroms_path'
$assembly
#if str($assembly_name).strip():
--assembly '$assembly_name'
#end if
-o '$output_parsed_pairs'
--min-mapq '$min_mapq'
--max-molecule-size '$max_molecule_size'
Expand All @@ -27,7 +29,7 @@
<inputs>
<param name="sam_path" type="data" format="sam,bam" label="Input SAM/BAM file" help="Input SAM or BAM file with paired-end sequence alignments of Hi-C molecules."/>
<param name="chroms_path" argument="-c" type="data" format="tabular" label="Input a chromosome order file" help="Chromosome order used to flip interchromosomal mates. Any scaffolds not listed will be ordered lexicographically."/>
<param name="assembly" type="text" value="" label="Input a name of a genome assembly" help="Name of genome assembly (e.g. hg19, mm10) to store in the pairs header"></param>
<param name="assembly_name" type="text" value="" label="Input a name of genome assembly" help="Name of genome assembly (e.g. hg19, mm10) to store in the pairs header"></param>
<param argument="--min-mapq" type="integer" value="40" min="0" label="Minimal MAPQ" help="Minimal MAPQ score to consider a read as uniquely mapped."/>
<param argument="--max-molecule-size" type="integer" min="0" value="750" label="Input the maximal size of a Hi-C molecule" help="The maximal size of a Hi-C molecule; used to rescue single ligations(from molecules with three alignments) and to rescue complex ligations."></param>
<param argument="--drop-readid" type="boolean" truevalue="--drop-readid" falsevalue="" checked="False" label="Do not add read ids to the output"></param>
Expand Down Expand Up @@ -112,6 +114,16 @@
<param name="output_stats" value="true"></param>
<output name="parsed_pairs_stats" file="output_parsed_pairs.stats" lines_diff="10"/>
</test>
<!--Test 08 with SAM file as input and default parameters and assembly name -->
<test expect_num_outputs="1">
<param name="sam_path" value="test.sam"/>
<param name="chroms_path" value="test.genome"/>
<param name="assembly_name" value="test_assembly"/>
<param name="min_mapq" value="1"/>
<param name="walks_policy" value="mask"/>
<param name="max_inter_algn_gap" value="20"/>
<output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_sam_assemblyname.pairs" lines_diff="10"/>
</test>

</tests>
<help><![CDATA[
Expand Down
Loading

0 comments on commit edb9fd7

Please sign in to comment.