# HG changeset patch # User artbio # Date 1557497702 14400 # Node ID 62aebaf6cfa0aefcbe3b4151095caa965bd937ef # Parent 1fe4d165ac0e070a614e0f6e08b416c107bc7a92 planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/concat_multi_datasets commit 64e9762ab35b04bb0d151e441baa2fae8bf2cb4a diff -r 1fe4d165ac0e -r 62aebaf6cfa0 catWrapper.xml --- a/catWrapper.xml Mon Apr 15 18:52:43 2019 -0400 +++ b/catWrapper.xml Fri May 10 10:15:02 2019 -0400 @@ -1,4 +1,4 @@ - + tail-to-head by specifying how concatenated/'${x.element_identifier}.listed.${x.ext}.listed' && + #end for + sleep 1 + #else: + #for $x, $y in zip($global_condition.collections_condition.input_1, $global_condition.collections_condition.input_2) + #if $x.ext[-2:] == "gz": + printf "# ${x.element_identifier}\n" | gzip -c > concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + gzip -dc '$x' | $concat_command | gzip -c >> concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + printf "# ${y.element_identifier}\n" | gzip -c >> concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + gzip -dc '$y' | $concat_command | gzip -c >> concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + #else: + printf "# ${x.element_identifier}\n" > concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + $concat_command '$x'>> concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + printf "# ${y.element_identifier}\n" >> concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + $concat_command '$y' >> concatenated/'${x.element_identifier}_${y.element_identifier}.listed.${x.ext}.listed' && + #end if + #end for + sleep 1 + #end if + #end if #else if $global_condition.input_type == "paired_collection": #if $global_condition.paired_cat_type == "by_strand": #if $dataset_names == "No": @@ -107,19 +132,31 @@ + - + + + + + + + + + + + + @@ -135,7 +172,7 @@ - global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'by_pair' + (global_condition['input_type'] == 'paired_collection' and global_condition['paired_cat_type'] == 'by_pair') or (global_condition['input_type'] == 'simple_collections' and global_condition['collections_condition']['collection_cat_type'] == 'two_collections') @@ -241,6 +278,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -250,13 +331,23 @@ **WARNING:** The paired collection operations do not handle gziped files. +**WARNING:** When concatenating 2 collections make sure the first collection is the one with the most items. + ----- **What it does** Concatenates datasets and paired collections with multiple options: - - It's possible select either a concatenation by strand, by pair or a whole collection concatenation, when the input is a paired collection. + - When the input is a paired collection: + + - concatenation by strand : forward and reverse datasets are concatenated separately and a list with a single forward - reverse dataset pair is returned + + - concatenation by pair : forward - reverse dataset pairs are concatenated and a simple dataset collection is returned + + - whole collection concatenation : all datasets in the collection are concatenated and a single dataset is returned + + - When the inputs are 2 collections: datasets are concatenated in a pairwise combination and a single dataset collection is returned - Skipping lines before concatenation to avoid headers @@ -294,6 +385,33 @@ ----- +**2 Collections concatenation** + +1rst collection:: + + a + b + c + d + +2nd collection:: + + 1 + 2 + 3 + 4 + +Concatenation result:: + + A single collection containing: + + a concatenated with 1 + b concatenated with 2 + c concatenated with 3 + d concatenated with 4 + +----- + **Paired collection concatenation example** 1rst pair:: @@ -304,7 +422,7 @@ forward - reverse -Concatenation by strand:: +- Concatenation by strand:: concatenates: @@ -315,7 +433,7 @@ 1 pair -Concatenation by pair:: +- Concatenation by pair:: concatenates: @@ -326,7 +444,7 @@ 2 datasets -Concatenate all:: +- Concatenate all:: concatenates: