-
Notifications
You must be signed in to change notification settings - Fork 508
Allow single file processing spades #7802
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
paulzierep
wants to merge
2
commits into
galaxyproject:main
Choose a base branch
from
paulzierep:add-single-file-input-metaspades
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 all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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 |
|---|---|---|
|
|
@@ -57,7 +57,18 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
| #return $ext | ||
| #end def | ||
|
|
||
| #if $singlePaired.sPaired == "single" or $singlePaired.sPaired == "paired_interlaced" | ||
| #if $singlePaired.sPaired == "single" | ||
| mkdir -p reads1 && | ||
| #set file_paths1 = [] | ||
| #for $input_file in $singlePaired.input1 | ||
| #set ext = $fix_ext($input_file.ext) | ||
| #set fname = re.sub('[^\w\-_.]', '_', $input_file.element_identifier) + '.' + $ext | ||
| #set file_path = 'reads1/' + $fname | ||
| ln -s '$input_file' '$file_path' && | ||
| $file_paths1.append($file_path) | ||
| #end for | ||
|
|
||
| #else if $singlePaired.sPaired == "single_collection" | ||
| mkdir -p reads1 && | ||
| #set file_paths1 = [] | ||
| #for $input_file in $singlePaired.input1 | ||
|
|
@@ -67,7 +78,40 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
| ln -s '$input_file' '$file_path' && | ||
| $file_paths1.append($file_path) | ||
| #end for | ||
|
|
||
| #else if $singlePaired.sPaired == "interlaced" | ||
| mkdir -p reads1 && | ||
| #set file_paths1 = [] | ||
| #set ext = $fix_ext($singlePaired.input_interlaced.ext) | ||
| #set file_path = 'reads1/interlaced.' + $ext | ||
| ln -s '$singlePaired.input_interlaced' '$file_path' && | ||
| $file_paths1.append($file_path) | ||
|
|
||
| #else if $singlePaired.sPaired == "interlaced_collection" | ||
| mkdir -p reads1 && | ||
| #set file_paths1 = [] | ||
| #for $input_file in $singlePaired.input1 | ||
| #set ext = $fix_ext($input_file.ext) | ||
| #set fname = re.sub('[^\w\-_.]', '_', $input_file.element_identifier) + '.' + $ext | ||
| #set file_path = 'reads1/' + $fname | ||
| ln -s '$input_file' '$file_path' && | ||
| $file_paths1.append($file_path) | ||
| #end for | ||
|
|
||
| #else if $singlePaired.sPaired == "paired" | ||
| mkdir -p paired_reads1 && | ||
| #set fw_reads1 = [] | ||
| #set rv_reads1 = [] | ||
| #set ext = $fix_ext($singlePaired.input.forward.ext) | ||
| #set file_path_fw = 'paired_reads1/forward.' + $ext | ||
| ln -s '$singlePaired.input.forward' '$file_path_fw' && | ||
| $fw_reads1.append($file_path_fw) | ||
| #set file_path_rv = 'paired_reads1/reverse.' + $ext | ||
| ln -s '$singlePaired.input.reverse' '$file_path_rv' && | ||
| $rv_reads1.append($file_path_rv) | ||
|
|
||
| #else | ||
| ## paired_collection | ||
| mkdir -p paired_reads1 && | ||
| #set fw_reads1 = [] | ||
| #set rv_reads1 = [] | ||
|
|
@@ -84,7 +128,26 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
| ]]></token> | ||
|
|
||
| <token name="@PREPROCESS_INPUT_FILES_ADDITIONAL@"><![CDATA[ | ||
| #if $additional_reads.singlePaired.sPaired == "single" or $additional_reads.singlePaired.sPaired == "paired_interlaced" | ||
| #if $additional_reads.singlePaired.sPaired == "single" | ||
| mkdir -p reads2 && | ||
| #set file_paths2 = [] | ||
| #for $input_file in $additional_reads.singlePaired.input1 | ||
| #set ext = $fix_ext($input_file.ext) | ||
| #set fname = re.sub('[^\w\-_.]', '_', $input_file.element_identifier) + '.' + $ext | ||
| #set file_path = 'reads2/' + $fname | ||
| ln -s '$input_file' '$file_path' && | ||
| $file_paths2.append($file_path) | ||
| #end for | ||
|
|
||
| #else if $additional_reads.singlePaired.sPaired == "interlaced" | ||
| mkdir -p reads2 && | ||
| #set file_paths2 = [] | ||
| #set ext = $fix_ext($additional_reads.singlePaired.input_interlaced.ext) | ||
| #set file_path = 'reads2/interlaced.' + $ext | ||
| ln -s '$additional_reads.singlePaired.input_interlaced' '$file_path' && | ||
| $file_paths2.append($file_path) | ||
|
|
||
| #else if $additional_reads.singlePaired.sPaired == "interlaced_collection" | ||
| mkdir -p reads2 && | ||
| #set file_paths2 = [] | ||
| #for $input_file in $additional_reads.singlePaired.input1 | ||
|
|
@@ -94,7 +157,21 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
| ln -s '$input_file' '$file_path' && | ||
| $file_paths2.append($file_path) | ||
| #end for | ||
|
|
||
| #else if $additional_reads.singlePaired.sPaired == "paired" | ||
| mkdir -p paired_reads2 && | ||
| #set fw_reads2 = [] | ||
| #set rv_reads2 = [] | ||
| #set ext = $fix_ext($additional_reads.singlePaired.input.forward.ext) | ||
| #set file_path_fw = 'paired_reads2/forward.' + $ext | ||
| ln -s '$additional_reads.singlePaired.input.forward' '$file_path_fw' && | ||
| $fw_reads2.append($file_path_fw) | ||
| #set file_path_rv = 'paired_reads2/reverse.' + $ext | ||
| ln -s '$additional_reads.singlePaired.input.reverse' '$file_path_rv' && | ||
| $rv_reads2.append($file_path_rv) | ||
|
|
||
| #else | ||
| ## paired_collection | ||
| mkdir -p paired_reads2 && | ||
| #set fw_reads2 = [] | ||
| #set rv_reads2 = [] | ||
|
|
@@ -123,12 +200,30 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
| #for $read in $file_paths1 | ||
| --s $library '${read}' | ||
| #end for | ||
| #else if $singlePaired.sPaired == "paired_interlaced" | ||
|
|
||
| #else if $singlePaired.sPaired == "interlaced" | ||
| #for $read in $file_paths1 | ||
| --${singlePaired.type_paired}-12 $library '${read}' | ||
| --${singlePaired.type_paired}-or $library $singlePaired.orientation | ||
| #end for | ||
|
|
||
| #else if $singlePaired.sPaired == "interlaced_collection" | ||
| #for $read in $file_paths1 | ||
| --${singlePaired.type_paired}-12 $library '${read}' | ||
| --${singlePaired.type_paired}-or $library $singlePaired.orientation | ||
| #end for | ||
|
|
||
| #else if $singlePaired.sPaired == "paired" | ||
| #for $read in $fw_reads1 | ||
| --${singlePaired.type_paired}-1 $library '${read}' | ||
| #end for | ||
| #for $read in $rv_reads1 | ||
| --${singlePaired.type_paired}-2 $library '${read}' | ||
| --${singlePaired.type_paired}-or $library $singlePaired.orientation | ||
| #end for | ||
|
|
||
| #else | ||
| ## paired_collection | ||
| #for $read in $fw_reads1 | ||
| --${singlePaired.type_paired}-1 $library '${read}' | ||
| #end for | ||
|
|
@@ -139,19 +234,21 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
| #end if | ||
| ]]></token> | ||
|
|
||
|
|
||
| <token name="@INPUT_READS_ADDITIONAL@"><![CDATA[ | ||
| @LIBRARY_NUMBER@ | ||
| #if $additional_reads.singlePaired.sPaired == "single" | ||
| #for $read in $file_paths2 | ||
| --s $library '${read}' | ||
| #end for | ||
| #else if $additional_reads.singlePaired.sPaired == "paired_interlaced" | ||
|
|
||
| #else if $additional_reads.singlePaired.sPaired == "interlaced" or $additional_reads.singlePaired.sPaired == "interlaced_collection" | ||
| #for $read in $file_paths2 | ||
| --${additional_reads.singlePaired.type_paired}-12 $library '${read}' | ||
| --${additional_reads.singlePaired.type_paired}-or $library $additional_reads.singlePaired.orientation | ||
| #end for | ||
|
|
||
| #else | ||
| ## paired + paired_collection | ||
| #for $read in $fw_reads2 | ||
| --${additional_reads.singlePaired.type_paired}-1 $library '${read}' | ||
| #end for | ||
|
|
@@ -349,19 +446,47 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
|
|
||
| <xml name="input_files_all" token_format="" token_label="" token_help="It assumes that all samples belong to the same library. If you want to use samples from two different libraries, include the second library as additional set of short-reads."> | ||
| <conditional name="singlePaired"> | ||
| <param name="sPaired" type="select" label="Single-end or paired-end short-reads" help="@HELP@"> | ||
| <option value="single">Single-end</option> | ||
| <option value="paired_interlaced">Paired-end: interlaced reads</option> | ||
| <option value="paired_collection" selected="true">Paired-end: list of dataset pairs</option> | ||
| <param name="sPaired" type="select" label="Input format for reads" help="@HELP@"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This macro could reuse |
||
| <option value="single">Single-end (individual assembly)</option> | ||
| <option value="paired">Paired-end: forward + reverse (individual assembly)</option> | ||
| <option value="interlaced">Paired-end: interlaced reads (individual assembly)</option> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we drop interlaced? I have never seen an interlaced dataset in my life. |
||
| <option value="single_collection">Single-end (co-assembly)</option> | ||
| <option value="interlaced_collection">Paired-end: interlaced reads (co-assembly)</option> | ||
| <option value="paired_collection" selected="true">Paired-end: list of dataset pairs (co-assembly)</option> | ||
| </param> | ||
|
|
||
| <!-- single-end individual --> | ||
| <when value="single"> | ||
| <param format="@FORMAT@" name="input1" type="data" multiple="true" label="@LABEL@"/> | ||
| <param format="@FORMAT@" name="input_single" type="data" label="@LABEL@: single-end"/> | ||
| </when> | ||
| <when value="paired_interlaced"> | ||
| <param format="@FORMAT@" name="input1" type="data" multiple="true" label="@LABEL@: interlaced"/> | ||
|
|
||
| <!-- paired individual --> | ||
| <when value="paired"> | ||
| <param format="@FORMAT@" name="input" type="data_collection" collection_type="paired" label="@LABEL@: paired reads"/> | ||
| <expand macro="type_paired"/> | ||
| <expand macro="orientation"/> | ||
| </when> | ||
|
|
||
| <!-- interlaced individual --> | ||
| <when value="interlaced"> | ||
| <param format="@FORMAT@" name="input_interlaced" type="data" label="@LABEL@: interlaced reads"/> | ||
| <expand macro="type_paired"/> | ||
| <expand macro="orientation"/> | ||
| </when> | ||
|
|
||
| <!-- single-end collection --> | ||
| <when value="single_collection"> | ||
| <param format="@FORMAT@" name="input1" type="data" multiple="true" label="@LABEL@: single-end"/> | ||
| </when> | ||
|
|
||
| <!-- interlaced collection --> | ||
| <when value="interlaced_collection"> | ||
| <param format="@FORMAT@" name="input1" type="data" multiple="true" label="@LABEL@: interlaced"/> | ||
| <expand macro="type_paired"/> | ||
| <expand macro="orientation"/> | ||
| </when> | ||
|
|
||
| <!-- paired collection --> | ||
| <when value="paired_collection"> | ||
| <param format="@FORMAT@" name="input" type="data_collection" collection_type="list:paired" label="@LABEL@: collection"/> | ||
| <expand macro="type_paired"/> | ||
|
|
@@ -373,20 +498,50 @@ export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} && | |
| <xml name="input_files_paired" tokens="format,label" token_help="It assumes that all samples belong to the same library. If you want to use samples from two different libraries, include the second library as additional set of short-reads."> | ||
| <conditional name="singlePaired"> | ||
| <param name="sPaired" type="select" label="Pair-end reads input format" help="@HELP@"> | ||
| <option value="paired_interlaced">Paired-end: interlaced reads</option> | ||
| <option value="paired_collection" selected="true">Paired-end: list of dataset pairs</option> | ||
| <option value="paired">Paired-end: forward + reverse (individual assembly)</option> | ||
| <option value="interlaced">Paired-end: interlaced reads (individual assembly)</option> | ||
| <option value="interlaced_collection">Paired-end: interlaced reads (co-assembly)</option> | ||
| <option value="paired_collection" selected="true">Paired-end: list of dataset pairs (co-assembly)</option> | ||
| </param> | ||
| <when value="paired_interlaced"> | ||
| <param format="@FORMAT@" name="input1" type="data" multiple="true" label="@LABEL@: interlaced"/> | ||
|
|
||
| <!-- single paired --> | ||
| <when value="paired"> | ||
| <param name="input" | ||
| type="data_collection" | ||
| collection_type="paired" | ||
| format="@FORMAT@" | ||
| label="@LABEL@: paired reads" | ||
| help="Provide one paired dataset with forward (R1) and reverse (R2) reads."/> | ||
| <expand macro="type_paired"/> | ||
| <expand macro="orientation"/> | ||
| </when> | ||
|
|
||
| <!-- single interlaced --> | ||
| <when value="interlaced"> | ||
| <param name="input_interlaced" | ||
| type="data" | ||
| format="@FORMAT@" | ||
| label="@LABEL@: interlaced reads" | ||
| help="Provide a single file with interleaved forward and reverse reads."/> | ||
| <expand macro="type_paired"/> | ||
| <expand macro="orientation"/> | ||
| </when> | ||
|
|
||
| <!-- multiple interlaced --> | ||
| <when value="interlaced_collection"> | ||
| <param format="@FORMAT@" name="input1" type="data" multiple="true" label="@LABEL@: interlaced"/> | ||
| <expand macro="type_paired"/> | ||
| <expand macro="orientation"/> | ||
| </when> | ||
|
|
||
| <!-- collection --> | ||
| <when value="paired_collection"> | ||
| <param format="@FORMAT@" name="input" type="data_collection" collection_type="list:paired" label="@LABEL@: collection"/> | ||
| <expand macro="type_paired"/> | ||
| <expand macro="orientation"/> | ||
| </when> | ||
| </conditional> | ||
|
|
||
| <param name="library_number" type="select" label="The samples belong to the same library" help="If the reads have been generated from the same sample, it means that they belong to the same library."> | ||
| <option value="true" selected="true">True</option> | ||
| <option value="false">False</option> | ||
|
|
||
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could imagine that having this implemented as a function would be beneficial.