-
Notifications
You must be signed in to change notification settings - Fork 489
[WIP] New tool addition: Sourmash tool suite #7491
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
Draft
Smkingsize
wants to merge
11
commits into
galaxyproject:main
Choose a base branch
from
Smkingsize:sourmash
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6c26b27
lets start here
Smkingsize 6fbc18d
sourmash sketch added parameters
Smkingsize e7d4f7c
soursketch almost ready
Smkingsize 836ea57
sourmash better specific tests
Smkingsize f3d118e
added new tools scelet files compare and compute
Smkingsize 91af641
sketch is ready
Smkingsize c26c706
fixed outputs of sourmash plot
Smkingsize 284f87b
Merge branch 'galaxyproject:main' into sourmash
Smkingsize 6e80ea3
re-structure suit file tree (no sub-directories)
Smkingsize bbcb72d
added valid categories.
Smkingsize fe78a43
moved the tool to tools/
Smkingsize File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <macros> | ||
| <xml name="requirements"> | ||
| <requirements> | ||
| <requirement type="package" version="@TOOL_VERSION@">samtools</requirement> | ||
| <yield/> | ||
| </requirements> | ||
| </xml> | ||
| <xml name="citations"> | ||
| <citations> | ||
| <citation type="doi">10.21105/joss.06830</citation> | ||
| </citations> | ||
| </xml> | ||
| </macros> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| genome-s10.fa.gz,genome-s11.fa.gz | ||
| 1.0,0.0 | ||
| 0.0,1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <macros> | ||
| <xml name="requirements"> | ||
| <requirements> | ||
| <requirement type="package" version="@TOOL_VERSION@">samtools</requirement> | ||
| <yield/> | ||
| </requirements> | ||
| </xml> | ||
| <xml name="citations"> | ||
| <citations> | ||
| <citation type="doi">10.21105/joss.06830</citation> | ||
| </citations> | ||
| </xml> | ||
| </macros> |
29 changes: 29 additions & 0 deletions
29
tool_collections/sourmash/sourmash_compare/sourmash_compare.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <tool id="sourmash_compare" name="sourmash compare" version="0.1.0+galaxy0" python_template_version="3.5" profile="21.05"> | ||
| <macros> | ||
| <import>macros.xml</import> | ||
| </macros> | ||
| <requirements> | ||
| </requirements> | ||
| <command detect_errors="exit_code"><![CDATA[ | ||
| sourmash compare | ||
| $input | ||
| -o $out_file1 | ||
| ]]></command> | ||
| <inputs> | ||
| <param name="input" type="data" format="fasta,fastq" label="Input file"/> | ||
| </inputs> | ||
| <outputs> | ||
| <data name="out_file1" format="fasta"/> | ||
| </outputs> | ||
| <tests> | ||
| </tests> | ||
| <help><![CDATA[ | ||
| Sourmash compute | ||
| ]]></help> | ||
| <expand macro="citations"/> | ||
| <creator> | ||
| <organization name="Galaxy Europe"/> | ||
| <person givenName="Ahmad" familyName="Mahagna" url="https://github.com/Smkingsize"/> | ||
| <person givenName="Saim" familyName="Momin" url="https://github.com/SaimMomin12"/> | ||
| </creator> | ||
| </tool> |
1 change: 1 addition & 0 deletions
1
...llections/sourmash/sourmash_compare/test-data/GCF_000005845.2_ASM584v2_genomic.fna.gz.sig
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...lections/sourmash/sourmash_compare/test-data/GCF_000017325.1_ASM1732v1_genomic.fna.gz.sig
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...lections/sourmash/sourmash_compare/test-data/GCF_000021665.1_ASM2166v1_genomic.fna.gz.sig
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <macros> | ||
| <xml name="requirements"> | ||
| <requirements> | ||
| <requirement type="package" version="@TOOL_VERSION@">samtools</requirement> | ||
| <yield/> | ||
| </requirements> | ||
| </xml> | ||
| <xml name="citations"> | ||
| <citations> | ||
| <citation type="doi">10.21105/joss.06830</citation> | ||
| </citations> | ||
| </xml> | ||
| </macros> |
112 changes: 112 additions & 0 deletions
112
tool_collections/sourmash/sourmash_plot/sourmash_plot.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| <tool id="sourmash_plot" name="sourmash plot" version="0.1.0+galaxy0" python_template_version="3.5" profile="21.05"> | ||
| <macros> | ||
| <import>macros.xml</import> | ||
| </macros> | ||
| <requirements> | ||
| </requirements> | ||
| <command detect_errors="exit_code"><![CDATA[ | ||
| ln -s $input cmp.dist && | ||
|
|
||
| #if $labels_cond.labels_param == "--labels": | ||
| ln -s $labels_cond.labels_file cmp.dist.labels.txt && | ||
| #end if | ||
|
|
||
| sourmash plot cmp.dist | ||
|
|
||
| $labels_cond.labels_param | ||
|
|
||
| ]]></command> | ||
| <inputs> | ||
| <param name="input" type="data" format="binary" label="Input file" help="input file generated distance matrix file generated with sourmash compare"/> | ||
| <conditional name="labels_cond"> | ||
| <param name="labels_param" type="select" label="Show labels" help="show sample labels on dendrogram/matrix"> | ||
| <option value="--labels"> Yes</option> | ||
| <option value="--no-labels" selected="true"> No</option> | ||
| </param> | ||
| <when value="--labels"> | ||
| <param name="labels_file" type="data" format="txt" label="Lables file" help="labels file generated with sourmash compare"/> | ||
| </when> | ||
| <when value="--no-labels"></when> | ||
Smkingsize marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </conditional> | ||
| </inputs> | ||
| <outputs> | ||
| <data name="matrix" format="png" from_work_dir="cmp.dist.matrix.png" label='${tool.name} on ${on_string}: matrix'/> | ||
| <data name="histogram" format="png" from_work_dir="cmp.dist.hist.png" label='${tool.name} on ${on_string}: histogram'/> | ||
| <data name="dendrogram" format="png" from_work_dir="cmp.dist.dendro.png" label='${tool.name} on ${on_string}: dendrogram'/> | ||
| </outputs> | ||
| <tests> | ||
| <!-- 1) basic no labels--> | ||
| <test expect_num_outputs="3"> | ||
| <param name="input" value="cmp.dist" /> | ||
| <output name="matrix" ftype="png"> | ||
| <assert_contents> | ||
| <has_size size="12k" delta="1k"/> | ||
| </assert_contents> | ||
| </output> | ||
| <output name="histogram" ftype="png"> | ||
| <assert_contents> | ||
| <has_size size="9k" delta="1k"/> | ||
| </assert_contents> | ||
| </output> | ||
| <output name="dendrogram" ftype="png"> | ||
| <assert_contents> | ||
| <has_size size="4k" delta="1k"/> | ||
| </assert_contents> | ||
| </output> | ||
| </test> | ||
| <!-- 2) labels--> | ||
| <test expect_num_outputs="3"> | ||
| <param name="input" value="cmp.dist" /> | ||
| <conditional name="labels_cond"> | ||
| <param name="labels_param" value="--labels"/> | ||
| <param name="labels_file" value="cmp.dist.labels.txt"/> | ||
| </conditional> | ||
| <output name="matrix" ftype="png"> | ||
| <assert_contents> | ||
| <has_size size="22k" delta="1k"/> | ||
| </assert_contents> | ||
| </output> | ||
| <output name="histogram" ftype="png"> | ||
| <assert_contents> | ||
| <has_size size="9k" delta="1k"/> | ||
| </assert_contents> | ||
| </output> | ||
| <output name="dendrogram" ftype="png"> | ||
| <assert_contents> | ||
| <has_size size="7k" delta="1k"/> | ||
| </assert_contents> | ||
| </output> | ||
| </test> | ||
| </tests> | ||
| <help><![CDATA[ | ||
| Sourmash plot | ||
|
|
||
| usage: plot [-h] [--pdf] [--labels] [--no-labels] [--labeltext LABELTEXT] [--indices] [--no-indices] [--vmin VMIN] [--vmax VMAX] | ||
| [--subsample N] [--subsample-seed S] [-f] [--output-dir DIR] [--csv F] [--labels-from LABELS_FROM] | ||
| distances | ||
|
|
||
| options: | ||
|
|
||
| -h, --help show this help message and exit | ||
| --pdf output PDF; default is PNG | ||
| --labels show sample labels on dendrogram/matrix | ||
| --no-labels do not show sample labels | ||
| --labeltext LABELTEXT filename containing list of labels (overrides signature names); implies --labels | ||
| --indices show sample indices but not labels; overridden by --labels | ||
| --no-indices do not show sample indices | ||
| --vmin VMIN lower limit of heatmap scale; default=0.000000 | ||
| --vmax VMAX upper limit of heatmap scale; default=1.000000 | ||
| --subsample N randomly downsample to this many samples, max | ||
| --subsample-seed S random seed for --subsample; default=1 | ||
SaimMomin12 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| -f, --force forcibly plot non-distance matrices | ||
| --output-dir DIR directory for output plots | ||
| --csv F write clustered matrix and labels out in CSV format (with column headers) to this file | ||
| --labels-from, --labels-load LABELS_FROM a CSV file containing label information to use on plot; implies --labels | ||
| ]]></help> | ||
| <expand macro="citations"/> | ||
| <creator> | ||
| <organization name="Galaxy Europe"/> | ||
| <person givenName="Ahmad" familyName="Mahagna" url="https://github.com/Smkingsize"/> | ||
| <person givenName="Saim" familyName="Momin" url="https://github.com/SaimMomin12"/> | ||
| </creator> | ||
Smkingsize marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </tool> | ||
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
tool_collections/sourmash/sourmash_plot/test-data/cmp.dist.labels.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| GCF_000005845.2_ASM584v2_genomic.fna.gz | ||
| GCF_000017325.1_ASM1732v1_genomic.fna.gz | ||
| GCF_000021665.1_ASM2166v1_genomic.fna.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <macros> | ||
| <xml name="requirements"> | ||
| <requirements> | ||
| <requirement type="package" version="@TOOL_VERSION@">samtools</requirement> | ||
Smkingsize marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <yield/> | ||
Smkingsize marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </requirements> | ||
| </xml> | ||
| <xml name="citations"> | ||
| <citations> | ||
| <citation type="doi">10.21105/joss.06830</citation> | ||
| </citations> | ||
| </xml> | ||
| </macros> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.