1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-25 21:49:55 +00:00

Update to use tar module compatible for our test databases

This commit is contained in:
James Fellows Yates 2022-09-14 11:16:28 +02:00
parent 05e9d92444
commit abbbf9c7ab
3 changed files with 25 additions and 12 deletions

View file

@ -107,7 +107,7 @@
}, },
"minimap2/index": { "minimap2/index": {
"branch": "master", "branch": "master",
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" "git_sha": "73e062cf5e0ef346f65d73009b1b656299359fc5"
}, },
"motus/merge": { "motus/merge": {
"branch": "master", "branch": "master",
@ -119,7 +119,7 @@
}, },
"multiqc": { "multiqc": {
"branch": "master", "branch": "master",
"git_sha": "16eee433b87b303bda650131ac5a0b1ad725e166" "git_sha": "5587389874dac9c9953a2ab6f01d49af81969492"
}, },
"porechop": { "porechop": {
"branch": "master", "branch": "master",
@ -139,7 +139,7 @@
}, },
"untar": { "untar": {
"branch": "master", "branch": "master",
"git_sha": "5e7b1ef9a5a2d9258635bcbf70fcf37dacd1b247" "git_sha": "393dbd6ddafe3f18eac02893dd4a21e4d45de679"
} }
} }
} }

View file

@ -25,12 +25,23 @@ process UNTAR {
""" """
mkdir output mkdir output
## Ensures --strip-components only applied when top level of tar contents is a directory
## If just files or multiple directories, place all in output
if [[ \$(tar -tzf ${archive} | grep "/\$" | wc -l) -eq 1 ]]; then
tar \\ tar \\
-C output --strip-components 1 \\ -C output --strip-components 1 \\
-xzvf \\ -xzvf \\
$args \\ $args \\
$archive \\ $archive \\
$args2 $args2
else
tar \\
-C output \\
-xzvf \\
$args \\
$archive \\
$args2
fi
mv output ${untar} mv output ${untar}

View file

@ -26,9 +26,9 @@ output:
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- untar: - untar:
type: file type: directory
description: description: Directory containing contents of archive
pattern: "*.*" pattern: "*/"
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
@ -36,3 +36,5 @@ output:
authors: authors:
- "@joseespinosa" - "@joseespinosa"
- "@drpatelh" - "@drpatelh"
- "@matthdsm"
- "@jfy133"