Giter Club home page Giter Club logo

Comments (3)

ivan-aksamentov avatar ivan-aksamentov commented on September 25, 2024 1

both tools were decompressing under the hood, which I didn't know either of them could

Huh! No worries! I never knew they did either. Good to know :)

from nextclade.

ivan-aksamentov avatar ivan-aksamentov commented on September 25, 2024

Hi Theo @theosanderson!

I cannot reproduce. I tried this:

docker run -it --rm nextstrain/nextclade:2.14.0 bash -c "set -euxo pipefail \
&& apt-get update >/dev/null \
&& apt-get install --yes file gzip >/dev/null \
&& nextclade dataset get --name=sars-cov-2 --output-dir=data/sars-cov-2 \
&& nextclade run --input-dataset=data/sars-cov-2 --input-ref=data/sars-cov-2/reference.fasta --input-gene-map=data/sars-cov-2/genemap.gff --genes=E,M,N,ORF1a,ORF1b,ORF3a,ORF6,ORF7a,ORF7b,ORF8,ORF9b,S --input-tree=data/sars-cov-2/tree.json --input-qc-config=data/sars-cov-2/qc.json --input-pcr-primers=data/sars-cov-2/primers.csv --input-virus-properties=data/sars-cov-2/virus_properties.json --output-tsv=output/nextclade.tsv.gz data/sars-cov-2/sequences.fasta \
&& file output/nextclade.tsv.gz \
&& gzip -t -v output/nextclade.tsv.gz \
"

Results:

debconf: delaying package configuration, since apt-utils is not installed
output/nextclade.tsv.gz: gzip compressed data, original size modulo 2^32 175624
output/nextclade.tsv.gz:	 OK

How do you check that the output file is not compressed? Can you provide some more steps to reproduce?

In terms of implementation, I believe that all created files go though this line:

let compressor = Compressor::from_path(buf_file, filepath)?;

including in the CSV/TSV file writer:

let csv_writer = CsvVecFileWriter::new(filepath, delimiter, &headers)?;

let file = create_file_or_stdout(filepath)?;

But let's see if something weird is happening

from nextclade.

theosanderson avatar theosanderson commented on September 25, 2024

I also can't reproduce. I was wrong. I am really sorry to have wasted your time on this. Thank you for writing such a detailed reply.

To explain what happened: I normally work on a system where less and wc both don't work on compressed files. I absent mindedly used wc -l to monitor a big gzipped Nextclade output (on a different system) and was surprised when it worked. I tried to "double-check" by "looking at the actual contents" with less, and that worked too so I thought it was plaintext. But actually both tools were decompressing under the hood, which I didn't know either of them could.

Really sorry again to have taken up your time! Thank you for Nextclade - it's wonderful.

from nextclade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.