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

Galaxy wrappers corepipeline #171

Merged
merged 24 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0e70bc5
rename scriptmanager macros file
owlang Oct 14, 2023
166d640
change nt color selector to match 4-color defaults
owlang Oct 15, 2023
1bd9506
strip number from input and output ids
owlang Oct 15, 2023
566005b
update input descriptions for consistency
owlang Oct 15, 2023
ee95cc5
refactor bam-to-scidx to fit core pipeline
owlang Oct 15, 2023
267edb8
add pearc citation to macro file
owlang Oct 19, 2023
3f66ba9
restructure tag-pileup XML output
owlang Oct 19, 2023
4a74091
use macro token to specify JAR filename
owlang Oct 19, 2023
253b641
reduce heatmap XML to just heatmap call
owlang Oct 19, 2023
f04eba4
add citation macro to XML wrappers
owlang Oct 19, 2023
74bf214
use macros for requirements
owlang Oct 26, 2023
bb82efa
format tool version information for consistency
owlang Oct 26, 2023
bdf5435
standardize pe-stat wrapper
owlang Nov 9, 2023
d5a5546
rename JAR_FILENAME in macros
owlang Nov 29, 2023
9304786
rename inputs to 'input1' and 'input2'
owlang Nov 29, 2023
5ec5491
add gzip support to expand-bed and bam-to-scidx
owlang Nov 29, 2023
a40f392
rename "select colors" to "preset" in GXML
owlang Nov 29, 2023
2660c2a
add gzip and min/max filter dependency on pe
owlang Nov 29, 2023
64582be
add gzip to bed-to-gff GXML
owlang Nov 29, 2023
6f998f6
update README with latest wrapper list
owlang Nov 29, 2023
eef87f7
add gzip support to coordinate converters
owlang Nov 30, 2023
be7267f
Add Cross Correlation Wrapper
DeanZ3 Feb 27, 2024
a751b2d
Merge branch 'master' into galaxy-wrappers-corepipeline
owlang Aug 2, 2024
b6171a0
adjust galaxy wrappers to use scriptmanager_macros
owlang Aug 2, 2024
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
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
Loading