Skip to content

Commit

Permalink
Merge pull request #171 from CEGRcode/galaxy-wrappers-corepipeline
Browse files Browse the repository at this point in the history
Complete draft set of galaxy wrappers including ones used for the core pipeline
  • Loading branch information
owlang authored Aug 2, 2024
2 parents 31734cb + b6171a0 commit 2e2f688
Show file tree
Hide file tree
Showing 40 changed files with 924 additions and 882 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added galaxy/.DS_Store
Binary file not shown.
Binary file added galaxy/wrapper/.DS_Store
Binary file not shown.
30 changes: 22 additions & 8 deletions galaxy/wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,27 @@ sudo git clone https://github.com/CEGRcode/scriptmanager-galaxy_tools.git
2. Tell galaxy where to look for scriptmanager tools by adding the following section to `/mnt/mountpoint/srv/galaxy/config/local_tool_conf.xml` file.

```
<section id="ScriptManager" name="ScriptManager" >
<tool file="scriptmanager-galaxy_tools/script_manager_heatmap.xml" />
<tool file="scriptmanager-galaxy_tools/script_manager_tag_pileup.xml" />
<tool file="scriptmanager-galaxy_tools/scriptmanager_heatmap_add_label.xml" />
<tool file="scriptmanager-galaxy_tools/script_manager_4color.xml" />
</section>
<section id="scriptmanager-owlang" name="ScriptManager" >
<tool file="scriptmanager-owlang/scriptmanager_bam-correlation.xml" />
<tool file="scriptmanager-owlang/scriptmanager_bam-to-bed.xml" />
<tool file="scriptmanager-owlang/scriptmanager_bam-to-bedgraph.xml" />
<tool file="scriptmanager-owlang/scriptmanager_bam-to-gff.xml" />
<tool file="scriptmanager-owlang/scriptmanager_bam-to-scidx.xml" />
<tool file="scriptmanager-owlang/scriptmanager_bed-to-gff.xml" />
<tool file="scriptmanager-owlang/scriptmanager_expand-bed.xml" />
<tool file="scriptmanager-owlang/scriptmanager_expand-gff.xml" />
<tool file="scriptmanager-owlang/scriptmanager_four-color.xml" />
<tool file="scriptmanager-owlang/scriptmanager_gff-to-bed.xml" />
<tool file="scriptmanager-owlang/scriptmanager_heatmap.xml" />
<tool file="scriptmanager-owlang/scriptmanager_label-heatmap.xml" />
<tool file="scriptmanager-owlang/scriptmanager_merge-heatmap.xml" />
<tool file="scriptmanager-owlang/scriptmanager_pe-stat.xml" />
<tool file="scriptmanager-owlang/scriptmanager_se-stat.xml" />
<tool file="scriptmanager-owlang/scriptmanager_shift-coord.xml" />
<tool file="scriptmanager-owlang/scriptmanager_sort-bed.xml" />
<tool file="scriptmanager-owlang/scriptmanager_sort-gff.xml" />
<tool file="scriptmanager-owlang/scriptmanager_tag-pileup.xml" />
</section>
```

3. Restart Galaxy
Expand All @@ -66,3 +79,4 @@ sudo git clone https://github.com/CEGRcode/scriptmanager-galaxy_tools.git
Thank you to Ali Nematbakhsh(https://github.com/AliNemat) and Audrey Sackey(https://github.com/Adjekai) for their initial work in writing these wrappers.
116 changes: 0 additions & 116 deletions galaxy/wrapper/macros.xml

This file was deleted.

7 changes: 5 additions & 2 deletions galaxy/wrapper/scriptmanager_aggregate-data.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<tool id="scriptmanager_aggregate-data" name="ScriptManager: Aggregate Data"
version="0.1.0+galaxy0" python_template_version="3.5" profile="21.05">
<description> Aggregate Data </description>
<macros>
<import>scriptmanager_macros.xml</import>
</macros>
<requirements>
<requirement type="package" version="11.0.11">openjdk</requirement>
<expand macro="requirement_openjdk" />
</requirements>
<command detect_errors="exit_code"><![CDATA[
java -jar $__tool_directory__/ScriptManager-v0.14.jar read-analysis aggregate-data
java -jar $__tool_directory__/@JAR_FILENAME@ read-analysis aggregate-data
#if str($output_file_name.bool) == "Yes" :
-o "$output_file_name.directory"
Expand Down
32 changes: 17 additions & 15 deletions galaxy/wrapper/scriptmanager_bam-correlation.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<tool id="bamcorrelation_test" name="ScriptManager: BAM Correlation" version="0.1.0+galaxy0" python_template_version="3.5" profile="21.05">
<tool id="scriptmanager_bam-correlation" name="ScriptManager: BAM Correlation" version="0.1.0" profile="22.01" >
<description> Genome-Genome correlations for replicate comparisons given multiple sorted and indexed (BAI) BAM files. </description>
<requirements>
<requirement type="package" version="11.0.11">openjdk</requirement>
<requirement type="package" version="1.9">samtools</requirement>
</requirements>
<macros>
<import>macros.xml</import>
<import>scriptmanager_macros.xml</import>
</macros>
<requirements>
<expand macro="requirement_openjdk" />
<expand macro="requirement_samtools" />
</requirements>
<command detect_errors="exit_code"><![CDATA[
ln -s '$BAM' bamfile.bam &&
ln -s '$output1' output1.tab &&
Expand All @@ -18,9 +18,10 @@
#end if
#end if
java -jar $__tool_directory__/ScriptManager-v0.14-dev.jar bam-statistics bam-correlation
java -jar $__tool_directory__/@JAR_FILENAME@ bam-statistics bam-correlation
#if str($read) == "read_1" :
-1
#else if str($read) == "read_2" :
Expand All @@ -33,14 +34,14 @@
-b "$bin_size"
--cpu "$cpu"
'$output1'
'$output1'
-t "$tag_shift"
bamfile.bam
]]></command>
<inputs>
<param type="data" name="BAM" format="bam" multiple="True" label="Input BAM files"/>
Expand All @@ -61,7 +62,8 @@
</outputs>
<help>
**What it does**
Genome-Genome correlations for replicate comparisons given multiple sorted and indexed (BAI) BAM files.

Genome-Genome correlations for replicate comparisons given multiple sorted and indexed (BAI) BAM files.
</help>
</tool>
<expand macro="citations_pearc" />
</tool>
93 changes: 46 additions & 47 deletions galaxy/wrapper/scriptmanager_bam-to-bed.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
<tool id="scriptmanager_bam-to-bed" name="ScriptManager: Convert BAM to BED" version="0.1.0+galaxy0" python_template_version="3.5" profile="21.05">
<tool id="scriptmanager_bam-to-bed" name="ScriptManager: Convert BAM to BED" version="0.1.0" profile="22.01" >
<description> Convert BAM file to BED file </description>
<macros>
<import>scriptmanager_macros.xml</import>
</macros>
<requirements>
<requirement type="package" version="11.0.11">openjdk</requirement>
<expand macro="requirement_openjdk" />
<expand macro="requirement_samtools" />
</requirements>
<command detect_errors="exit_code"><![CDATA[
ln -s '$BAM' bamfile.bam &&
ln -s '$output1' output1.bed &&
#if $BAM.is_of_type('bam'):
#if str( $BAM.metadata.bam_index ) != "None":
ln -s '${BAM.metadata.bam_index}' bamfile.bam.bai &&
ln -s '$input' bamfile.bam &&
#if $input.is_of_type('bam'):
#if str( $input.metadata.bam_index ) != "None":
ln -s '${input.metadata.bam_index}' bamfile.bam.bai &&
#else:
samtools index bamfile.bam bamfile.bai &&
#end if
#end if
java -jar $__tool_directory__/ScriptManager-v0.14.jar bam-format-converter bam-to-bed
java -jar $__tool_directory__/@JAR_FILENAME@ bam-format-converter bam-to-bed
#if str($gzip) == "Yes" :
--gzip
#end if
#if str($read) == "read_1" :
-1
#else if str($read) == "read_2" :
Expand All @@ -27,62 +33,55 @@
#else if str($read) == "fragment" :
-f
#end if
#if str($mate_pair) == "Yes" :
#if str($require_paired_end.mate_pair) == "Yes" :
-p
#if str($require_paired_end.filter_by_min.filter_min) == "Yes" :
-n "$require_paired_end.filter_by_min.min_insert"
#end if
#if str($require_paired_end.filter_by_max.filter_max) == "Yes" :
-x "$require_paired_end.filter_by_max.max_insert"
#end if
#end if
#if str($filter_by_min.filter_min) == "Yes" :
-n "$filter_by_min.min_insert"
#end if
-o output1.bed
#if str($filter_by_max.filter_max) == "Yes" :
-x "$filter_by_max.max_insert"
#end if
-o '$output'
bamfile.bam
]]></command>
<inputs>
<param type="data" name="BAM" format="bam" label="Input BAM file"/>

<param type="data" name="input" format="bam" label="Input BAM file"/>
<param type="select" name="read" label="Select which read to output">
<option value="read_1" selected="True" >Read 1</option>
<option value="read_2" >Read 2</option>
<option value="combined" >Combined </option>
<option value="midpoint" >Midpoint (Require PE) </option>
<option value="fragment" >Fragment (Require PE) </option>
</param>

<param type="boolean" name="mate_pair" truevalue="Yes" falsevalue="No" label="Require proper mate-pair" />

<conditional name="filter_by_min">
<param type="boolean" name="filter_min" truevalue="Yes" falsevalue="No" label="Filter by min insert size (bp)" >
</param>
<conditional name="require_paired_end">
<param type="boolean" name="mate_pair" truevalue="Yes" falsevalue="No" label="Require proper mate-pair" />
<when value="Yes">
<param type="integer" name="min_insert" value="0" label="Min insert size (bp)" />
</when>
<when value="No">
<conditional name="filter_by_min">
<param type="boolean" name="filter_min" truevalue="Yes" falsevalue="No" label="Filter by min insert size (bp)" />
<when value="Yes">
<param type="integer" name="min_insert" value="0" label="Min insert size (bp)" />
</when>
<when value="No" />
</conditional>
<conditional name="filter_by_max">
<param type="boolean" name="filter_max" truevalue="Yes" falsevalue="No" label="Filter by max insert size (bp)" />
<when value="Yes">
<param type="integer" name="max_insert" value="1000" label="Max insert size (bp)" />
</when>
<when value="No" />
</conditional>
</when>
</conditional>

<conditional name="filter_by_max">
<param type="boolean" name="filter_max" truevalue="Yes" falsevalue="No" label="Filter by max insert size (bp)" >
</param>
<when value="Yes">
<param type="integer" name="max_insert" value="1000" label="Max insert size (bp)" />
</when>
<when value="No">
</when>
</conditional>

<param name="gzip" type="boolean" checked="true" truevalue="Yes" falsevalue="No" label="Gzip output" />
</inputs>
<outputs>
<data name="output1" format="bed" label="${tool.name} (composite) on ${on_string}"/>
<data name="output" format="bed" label="${tool.name} (composite) on ${on_string}"/>
</outputs>
<help>
**What it does**
Convert BAM file to BED file.
**What it does**

Convert BAM file to BED file.
</help>
</tool>
<expand macro="citations_pearc" />
</tool>
Loading

0 comments on commit 2e2f688

Please sign in to comment.