I'm having issues with using the `untar` module in...
# modules
j
I'm having issues with using the
untar
module in setup with nf-tests with NCBI's taxdump as the input file for the taxonkit/list module. It looks like that file just isn't being downloaded properly prior to untar being run. Here's the error message from the conda test, though the others yielded errors this time as well (originally only the conda test failed)
Copy code
> Caused by:
    >   Process `UNTAR (taxdump.tar.gz)` terminated with an error exit status (2)
    > 
    > 
    > Command executed:
    > 
    >   mkdir test
    >   
    >   ## Ensures --strip-components only applied when top level of tar contents is a directory
    >   ## If just files or multiple directories, place all in prefix
    >   if [[ $(tar -taf taxdump.tar.gz | grep -o -P "^.*?\/" | uniq | wc -l) -eq 1 ]]; then
    >       tar \
    >           -C test --strip-components 1 \
    >           -xavf \
    >            \
    >           taxdump.tar.gz \
    >   
    >   else
    >       tar \
    >           -C test \
    >           -xavf \
    >            \
    >           taxdump.tar.gz \
    >   
    >   fi
    >   
    >   cat <<-END_VERSIONS > versions.yml
    >   "UNTAR":
    >       untar: $(echo $(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*$//')
    >   END_VERSIONS
    > 
    > Command exit status:
    >   2
    > 
    > Command output:
    >   citations.dmp
    >   delnodes.dmp
    >   division.dmp
    >   gencode.dmp
    >   images.dmp
    >   merged.dmp
    >   names.dmp
    > 
    > Command error:
    >   
    >   gzip: stdin: invalid compressed data--format violated
    >   tar: Unexpected EOF in archive
    >   tar: Error is not recoverable: exiting now
    >   citations.dmp
    >   delnodes.dmp
    >   division.dmp
    >   gencode.dmp
    >   images.dmp
    >   merged.dmp
    >   names.dmp
    >   
    >   gzip: stdin: invalid compressed data--format violated
    >   tar: Unexpected EOF in archive
    >   tar: Unexpected EOF in archive
    >   tar: Error is not recoverable: exiting now
My test for taxonkit/list is here, and it's based on taxonkit/lineage's test So, my questions are: 1. Am I missing some difference between untar in the test for this module vs taxonkit/lineage, or is there something I could add or change to make the test more reliable as is? 2. Alternatively, would it be possible for me to add a "mini" taxdump.tar.gz file to the test-datasets repository that only contains information relevant to the lineages for Homo sapiens and the corresponding subspecies?