Giter Club home page Giter Club logo

Comments (7)

ivan-aksamentov avatar ivan-aksamentov commented on June 17, 2024 1

@ArtPoon It's not a compilation error, but a runtime error from Nextclade.

The comment in the guide suggests to retrieve a dataset first:

# Build and run Nextclade in debug mode (convenient for development, fast to build, slow to run, has debug info)
# Nextclade dataset is expected to be in ./data_dev/, refer to Nextclade dataset information
# (https://docs.nextstrain.org/projects/nextclade/en/stable/user/datasets.html#download-a-dataset)
# Refer to the user documentation for explanation of Nextclade CLI flags (https://docs.nextstrain.org/projects/nextclade/en/stable/)

This is what Nextclade software requires as inputs and cargo run just compiles and then runs Nextclade with the specified flags.

It is mentioned only briefly in dev docs, because when I wrote it, I assumed Nextclade devs are already familiar with Nextclade from user's standpoint. But we've actually already had a similar situation where this assumption turned out to be incorrect. So perhaps we need to add a command for downloading a dataset to the dev docs. But it's a nuanced topic and as a dev you probably want to have multiple datasets. or even all of them from https://github.com/nextstrain/nextclade_data, perhaps some tweaked/custom datasets etc. We need to decide what is most appropriate for the dev guide.

from nextclade.

ArtPoon avatar ArtPoon commented on June 17, 2024 1

Ok find command located binary in target/release. Just did a brute force copy of binary to /usr/local/bin.

from nextclade.

corneliusroemer avatar corneliusroemer commented on June 17, 2024

Adding a nextclade dataset command before the run step to the dev docs should fix this issue in the future. See #1145

@ArtPoon I think this is the step that errored, right?

cargo run --bin=nextclade -- run \
  data_dev/sequences.fasta \
  --input-dataset=data_dev/ \
  --output-fasta='out/nextclade.aligned.fasta' \
  --output-tsv='out/nextclade.tsv' \
  --output-tree='out/nextclade.tree.json' \
  --in-order \
  --include-reference
    Finished dev [unoptimized + debuginfo] target(s) in 0.25s
     Running `target/debug/nextclade run data_dev/sequences.fasta --input-dataset=data_dev/ --output-fasta=out/nextclade.aligned.fasta --output-tsv=out/nextclade.tsv --output-tree=out/nextclade.tree.json --in-order --include-reference`

from nextclade.

ArtPoon avatar ArtPoon commented on June 17, 2024

Yes that did the trick. Sorry for my noob question!

(venv) art@Kestrel:~/git/nextclade$ cargo run --bin=nextclade -- dataset get --name=sars-cov-2 --output-dir=data_dev
    Finished dev [unoptimized + debuginfo] target(s) in 0.41s
     Running `target/debug/nextclade dataset get --name=sars-cov-2 --output-dir=data_dev`
(venv) art@Kestrel:~/git/nextclade$ cargo run --bin=nextclade -- run   data_dev/sequences.fasta   --input-dataset=data_dev/   --output-fasta='out/nextclade.aligned.fasta'   --output-tsv='out/nextclade.tsv'   --output-tree='out/nextclade.tree.json'   --in-order   --include-reference
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
     Running `target/debug/nextclade run data_dev/sequences.fasta --input-dataset=data_dev/ --output-fasta=out/nextclade.aligned.fasta --output-tsv=out/nextclade.tsv --output-tree=out/nextclade.tree.json --in-order --include-reference`
(venv) art@Kestrel:~/git/nextclade$ cargo build --release --bin=nextclade
   Compiling libc v0.2.126
...
   Compiling nextclade v2.13.1 (/home/art/git/nextclade/packages_rs/nextclade)
   Compiling nextclade-cli v2.13.1 (/home/art/git/nextclade/packages_rs/nextclade-cli)
    Finished release [optimized] target(s) in 3m 47s
(venv) art@Kestrel:~/git/nextclade$ ./target/release/nextclade run \
>   data_dev/sequences.fasta \
>   --input-dataset=data_dev/ \
>   --output-fasta='out/nextclade.aligned.fasta' \
>   --output-tsv='out/nextclade.tsv' \
>   --output-tree='out/nextclade.tree.json' \
>   --in-order \
>   --include-reference

However there is no nextclade binary.

from nextclade.

corneliusroemer avatar corneliusroemer commented on June 17, 2024

Sorry, this is of course not obvious to non-rustaceans! :)

from nextclade.

ivan-aksamentov avatar ivan-aksamentov commented on June 17, 2024

We should probably link to the Rust Book and Cargo Book in the docs.

https://doc.rust-lang.org/book/

https://doc.rust-lang.org/cargo/

And perhaps also docs for other important tech stack components: Typescript, Node.js, yarn, React, Recoil and Next.js

There's a lot of things to know before a complex app like this can be understood.

from nextclade.

ArtPoon avatar ArtPoon commented on June 17, 2024

Certainly linking this particular page would be helpful:
https://doc.rust-lang.org/book/ch01-03-hello-cargo.html

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.