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

hicBuildMatrix SAM inputs changed from repeat to plain params #6670

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
32 changes: 8 additions & 24 deletions tools/hicexplorer/hicBuildMatrix.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="hicexplorer_hicbuildmatrix" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<tool id="hicexplorer_hicbuildmatrix" name="@BINARY@" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@">
<description>create a contact matrix</description>
<macros>
<token name="@BINARY@">hicBuildMatrix</token>
Expand All @@ -10,10 +10,7 @@
mkdir ./QCfolder &&
mkdir '$qc.files_path' &&
@BINARY@
--samFiles
#for $repeat in $samFiles:
'${repeat.samFile}'
#end for
--samFiles '$samFile1' '$samFile2'

--restrictionCutFile '$restrictionCutFile'

Expand Down Expand Up @@ -43,7 +40,7 @@
#if $dbKey:
--genomeAssembly '$dbKey'
#else
--genomeAssembly '$samFiles[0].samFile.metadata.dbkey'
--genomeAssembly '$samFile1.metadata.dbkey'
#end if

#if $region:
Expand Down Expand Up @@ -79,12 +76,7 @@
]]>
</command>
<inputs>
<!-- can we use multiple=True here with min="2" and max="2" ? -->
<repeat max="2" min="2" name="samFiles" title="Sam/Bam files to process (forward/reverse)" help="Please use the special BAM datatype: qname_input_sorted.bam and use for 'bowtie2' the '--reorder' option to create a BAM file.">
<param name="samFile" type="data" format="sam,qname_input_sorted.bam">
</param>
</repeat>

<expand macro="samFiles" />
<expand macro="restrictionCutFile" />
<expand macro="restrictionSequence" />
<expand macro="danglingSequence" />
Expand Down Expand Up @@ -142,12 +134,8 @@
</outputs>
<tests>
<test expect_num_outputs="4">
<repeat name="samFiles">
<param name="samFile" value="small_test_R1_unsorted.sam" dbkey="hg38" />
</repeat>
<repeat name="samFiles">
<param name="samFile" value="small_test_R2_unsorted.sam" dbkey="hg38" />
</repeat>
<param name="samFile1" value="small_test_R1_unsorted.sam" dbkey="hg38" />
<param name="samFile2" value="small_test_R2_unsorted.sam" dbkey="hg38" />
<param name="outputFormat" value="h5" />
<repeat name="binSizes">
<param name="binSize" value="5000" />
Expand All @@ -165,12 +153,8 @@
<output name="raw_qc" file="raw_qc_report" compare="diff" lines_diff="2" />
</test>
<test expect_num_outputs="4">
<repeat name="samFiles">
<param name="samFile" value="small_test_R1_unsorted.sam" dbkey="hg38" />
</repeat>
<repeat name="samFiles">
<param name="samFile" value="small_test_R2_unsorted.sam" dbkey="hg38" />
</repeat>
<param name="samFile1" value="small_test_R1_unsorted.sam" dbkey="hg38" />
<param name="samFile2" value="small_test_R2_unsorted.sam" dbkey="hg38" />
<repeat name="binSizes">
<param name="binSize" value="5000" />
</repeat>
Expand Down
33 changes: 9 additions & 24 deletions tools/hicexplorer/hicBuildMatrixMicroC.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="hicexplorer_hicbuildmatrixmicroc" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<tool id="hicexplorer_hicbuildmatrixmicroc" name="@BINARY@" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@">
<description>create a contact matrix</description>
<macros>
<token name="@BINARY@">hicBuildMatrixMicroC</token>
Expand All @@ -10,10 +10,7 @@
mkdir ./QCfolder &&
mkdir '$qc.files_path' &&
@BINARY@
--samFiles
#for $repeat in $samFiles:
'${repeat.samFile}'
#end for
--samFiles '$samFile1' '$samFile2'

#if $maxLibraryInsertSize:
--maxLibraryInsertSize $maxLibraryInsertSize
Expand All @@ -32,7 +29,7 @@
#if $dbKey:
--genomeAssembly '$dbKey'
#else
--genomeAssembly '$samFiles[0].samFile.metadata.dbkey'
--genomeAssembly '$samFile1.metadata.dbkey'
#end if
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add a unspecified_build validator to both inputs.


#if $region:
Expand Down Expand Up @@ -67,11 +64,7 @@
]]>
</command>
<inputs>
<!-- can we use multiple=True here with min="2" and max="2" ? -->
<repeat max="2" min="2" name="samFiles" title="Sam/Bam files to process (forward/reverse)" help="Please use the special BAM datatype: qname_input_sorted.bam and use for 'bowtie2' the '--reorder' option to create a BAM file.">
<param name="samFile" type="data" format="sam,qname_input_sorted.bam">
</param>
</repeat>
<expand macro="samFiles" />

<param argument="--maxLibraryInsertSize" type="integer" optional="true" value="" label="Maximum library insert size defines different cut offs based on the maximum expected library size" help="*This is not the average fragment size* but the higher end of the fragment size distribution (obtained using for example Fragment Analyzer)
which usually is between 800 to 1500 bp. If this value if not known use the default of 1000. The insert value is used to decide if two mates
Expand Down Expand Up @@ -123,12 +116,8 @@
</outputs>
<tests>
<test expect_num_outputs="4">
<repeat name="samFiles">
<param name="samFile" value="small_test_R1_unsorted.sam" dbkey="hg38" />
</repeat>
<repeat name="samFiles">
<param name="samFile" value="small_test_R2_unsorted.sam" dbkey="hg38" />
</repeat>
<param name="samFile1" value="small_test_R1_unsorted.sam" dbkey="hg38" />
<param name="samFile2" value="small_test_R2_unsorted.sam" dbkey="hg38" />
<param name="outputFormat" value="h5" />
<repeat name="binSizes">
<param name="binSize" value="5000" />
Expand All @@ -143,12 +132,8 @@
<output name="raw_qc" file="raw_qc_report_micro-c" compare="diff" lines_diff="2" />
</test>
<test expect_num_outputs="4">
<repeat name="samFiles">
<param name="samFile" value="small_test_R1_unsorted.sam" dbkey="hg38" />
</repeat>
<repeat name="samFiles">
<param name="samFile" value="small_test_R2_unsorted.sam" dbkey="hg38" />
</repeat>
<param name="samFile1" value="small_test_R1_unsorted.sam" dbkey="hg38" />
<param name="samFile2" value="small_test_R2_unsorted.sam" dbkey="hg38" />
<repeat name="binSizes">
<param name="binSize" value="5000" />
</repeat>
Expand All @@ -169,7 +154,7 @@ Creation of the contact matrix
===============================


**hicBuildMatrixMicroC** generates a contact matrix from Micro-C read pairs, using paired-end Hi-C reads mapped to a reference genome. This process requires two SAM or BAM files: one for the first mate and one for the second mate of the paired-end reads. These files must be unaligned by position (i.e., not sorted). Unlike traditional Hi-C data, where restriction enzyme cut sites determine resolution, Micro-C does not rely on such sites. Instead, the contact matrix is created using a fixed bin size (e.g., 10,000 bp).
**hicBuildMatrixMicroC** generates a contact matrix from Micro-C read pairs, using paired-end Hi-C reads mapped to a reference genome. This process requires two SAM or BAM files: one for the first mate and one for the second mate of the paired-end reads. These files must be unaligned by position (i.e., not sorted). Unlike traditional Hi-C data, where restriction enzyme cut sites determine resolution, Micro-C does not rely on such sites. Instead, the contact matrix is created using a fixed bin size (e.g., 10,000 bp).

Additionally, **hicBuildMatrixMicroC** produces a quality control report to evaluate the quality of the Hi-C reads, aiding in determining the success of both the experimental protocol and sequencing process.

Expand Down
22 changes: 6 additions & 16 deletions tools/hicexplorer/hicQuickQC.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="hicexplorer_hicquickqc" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<tool id="hicexplorer_hicquickqc" name="@BINARY@" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@">
<description>get a first quality estimate of Hi-C data</description>
<macros>
<token name="@BINARY@">hicQuickQC</token>
Expand All @@ -11,13 +11,10 @@
mkdir $qc.files_path &&
@BINARY@

--samFiles
#for $repeat in $samFiles:
'${repeat.samFile}'
#end for
--samFiles '$samFile1' '$samFile2'

--restrictionCutFile '$restrictionCutFile'

#if $restrictionSequence:
--restrictionSequence $restrictionSequence
#end if
Expand All @@ -34,10 +31,7 @@
&& mv $qc.files_path/*.log raw_qc
]]> </command>
<inputs>
<!-- can we use multiple="true" with min="2" and max="2" ? -->
<repeat max="2" min="2" name="samFiles" title="Sam/Bam files to process (forward/reverse)" help="Please use the special BAM datatype: qname_input_sorted.bam and use for 'bowtie2' the '--reorder' option to create a BAM file.">
<param name="samFile" type="data" format="sam,qname_input_sorted.bam" />
</repeat>
<expand macro="samFiles" />
<expand macro="restrictionCutFile" />
<expand macro="restrictionSequence" />
<expand macro="danglingSequence" />
Expand All @@ -49,12 +43,8 @@
</outputs>
<tests>
<test expect_num_outputs="2">
<repeat name="samFiles">
<param name="samFile" value="small_test_R1_unsorted.sam" />
</repeat>
<repeat name="samFiles">
<param name="samFile" value="small_test_R2_unsorted.sam" />
</repeat>
<param name="samFile1" value="small_test_R1_unsorted.sam" />
<param name="samFile2" value="small_test_R2_unsorted.sam" />
<param name="restrictionCutFile" value="DpnII_10k.bed" />
<param name="restrictionSequence" value="GATC" />
<param name="danglingSequence" value="GATC" />
Expand Down
9 changes: 9 additions & 0 deletions tools/hicexplorer/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
<param argument='--dpi' type='integer' optional='true' min="10" max="1000" label='DPI for image' help='Change the default resolution of the plot.' />
</xml>

<xml name="samFiles">
<param name="samFile1" type="data" format="sam,qname_input_sorted.bam" label="Forward SAM/BAM file to process" help="Please use the special BAM datatype: qname_input_sorted.bam and use for 'bowtie2' the '--reorder' option to create a BAM file.">
<validator type="unspecified_build" />
</param>
<param name="samFile2" type="data" format="sam,qname_input_sorted.bam" label="Reverse SAM/BAM file to process" help="Please use the special BAM datatype: qname_input_sorted.bam and use for 'bowtie2' the '--reorder' option to create a BAM file.">
<validator type="unspecified_build" />
</param>
</xml>

<xml name="restrictionCutFile">
<param argument="--restrictionCutFile" type="data" format="bed" optional="false" label="BED file with all restriction cut places" help="Should contaion only mappable restriction sites. If given, the bins are set to match the restriction fragments
(i.e. the region between one restriction site and the next)." />
Expand Down
Loading