Skip to content

Commit

Permalink
Merge pull request #876 from nextstrain/fix/cli-crash-on-unknown-nuc
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov authored Jun 22, 2022
2 parents f4627bb + 444ceaa commit bad2f65
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
25 changes: 13 additions & 12 deletions packages_rs/nextclade-cli/src/cli/nextalign_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,20 @@ pub fn nextalign_run(args: NextalignRunArgs) -> Result<(), Report> {

for FastaRecord { seq_name, seq, index } in &fasta_receiver {
info!("Processing sequence '{seq_name}'");
let qry_seq = to_nuc_seq(&seq)
.wrap_err_with(|| format!("When processing sequence #{index} '{seq_name}'"))
.unwrap();

let outputs_or_err = nextalign_run_one(
&qry_seq,
ref_seq,
ref_peptides,
gene_map,
gap_open_close_nuc,
gap_open_close_aa,
alignment_params,
);
let outputs_or_err = to_nuc_seq(&seq)
.wrap_err_with(|| format!("When processing sequence #{index} '{seq_name}'"))
.and_then(|qry_seq| {
nextalign_run_one(
&qry_seq,
ref_seq,
ref_peptides,
gene_map,
gap_open_close_nuc,
gap_open_close_aa,
alignment_params,
)
});

let record = NextalignRecord {
index,
Expand Down
35 changes: 18 additions & 17 deletions packages_rs/nextclade-cli/src/cli/nextclade_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,25 @@ pub fn nextclade_run(args: NextcladeRunArgs) -> Result<(), Report> {

for FastaRecord { seq_name, seq, index } in &fasta_receiver {
info!("Processing sequence '{seq_name}'");
let qry_seq = to_nuc_seq(&seq)
.wrap_err_with(|| format!("When processing sequence #{index} '{seq_name}'"))
.unwrap();

let outputs_or_err = nextclade_run_one(
&seq_name,
&qry_seq,
ref_seq,
ref_peptides,
gene_map,
primers,
tree,
qc_config,
virus_properties,
gap_open_close_nuc,
gap_open_close_aa,
alignment_params,
);
let outputs_or_err = to_nuc_seq(&seq)
.wrap_err_with(|| format!("When processing sequence #{index} '{seq_name}'"))
.and_then(|qry_seq| {
nextclade_run_one(
&seq_name,
&qry_seq,
ref_seq,
ref_peptides,
gene_map,
primers,
tree,
qc_config,
virus_properties,
gap_open_close_nuc,
gap_open_close_aa,
alignment_params,
)
});

let record = NextcladeRecord {
index,
Expand Down

1 comment on commit bad2f65

@vercel
Copy link

@vercel vercel bot commented on bad2f65 Jun 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nextclade – ./

nextclade-nextstrain.vercel.app
nextclade-git-master-nextstrain.vercel.app
nextclade.vercel.app

Please sign in to comment.