# Trouble with SARS\_CoV\_2

**URL:** <https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822>\
**Category:** Help and Getting Started\
**Created:** [January 28, 2025, 8:21pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822 "2025-01-28T20:21:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 28, 2025, 8:21pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/1 "2025-01-28T20:21:36Z")

</div>

Hi mentors, I’m trying to make a tree with augur. I have my sequences in the data folder and I have my metadata. However, when I execute it with:

```plaintext
nextstrain build . --cores 1 --configfile config.yaml

```

I get this error:

```plaintext
ERROR: TreeTime.reroot -- ERROR: unsupported rooting mechanisms or root not found

ERROR from TreeTime: This error is most likely due to a problem with your input data.
Please check your input data and try again. If you continue to have problems, please open a new issue including
the original command and the error above: <https://github.com/nextstrain/augur/issues/new/choose>

augur refine is using TreeTime version 0.11.1

15.99 TreeTime.reroot: with method or node: Wuhan-Hu-1/2019 

```

It also seems to make a filter and in the masked\_filtered file it only leaves one sequence, but my analysis is of more than 2300 sequences. Please could you help me?

Best regards,

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 28, 2025, 11:01pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/2 "2025-01-28T23:01:52Z")

</div>

Hi @alfredobrunoc,

It’s likely that the root is not present after filtering/sampling. Could you share your config.yaml file or even better, the rest of the workflow code? We have a [SARS-CoV-2 workflow](https://github.com/nextstrain/ncov), however it does not have a “masked\_filtered” file so I assume you are using a custom workflow.

– Victor

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 29, 2025, 1:39am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/4 "2025-01-29T01:39:14Z")

</div>

Based on the reference to `scripts/construct-recency-from-submission-date.py`, I’m guessing you are using the Nextstrain SARS-CoV-2 workflow or at least a modified version of it. Have you tried the [tutorial series](https://docs.nextstrain.org/projects/ncov/en/latest/tutorial/intro.html)? It would be helpful to know if those are working.

For the new error, it would be helpful to know what the error details in the log file are.

The config.yaml you provided does not follow the expected format: [Workflow config file reference](https://docs.nextstrain.org/projects/ncov/en/latest/reference/workflow-config-file.html). I assume you meant to make something along the lines of

```yaml
refine:
  root: "Wuhan/Hu-1/2019"

filter:
  min_length: 20000

```

There may also be an issue with the input data, but I can’t say for sure without specific information about the workflow you are using and the ANDINOS.fasta file.

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 29, 2025, 9:34pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/6 "2025-01-29T21:34:14Z")

</div>

Thanks for providing those files. I was able to reproduce your issue on the latest commit to the ncov workflow ([8beaf39](https://github.com/nextstrain/ncov/commit/8beaf391856d81907c1ea1741602034e454b8bc7)). If you look further above in the output, there is a useful error message:

```plaintext
Traceback (most recent call last):
  File "/nextstrain/build/scripts/construct-recency-from-submission-date.py", line 41, in <module>
    node_data['nodes'][strain] = {'recency': get_recency(d['date_submitted'], ref_date)}
  …
ValueError: time data '?' does not match format '%Y-%m-%d'

```

This is due to `?` values under the [`date_submitted`](https://docs.nextstrain.org/projects/ncov/en/latest/reference/metadata-fields.html#column-23-date-submitted) column in the ANDINOS.tsv metadata file. To fix this, you can ensure that all the values under that column are in YYYY-MM-DD format or remove the column entirely to skip steps in the workflow which use that column.

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 29, 2025, 10:05pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/7 "2025-01-29T22:05:38Z")

</div>

Also, I noticed that your files may contain sensitive data. You can edit the post to remove the files now that we have determined the problem.

Let me know if you have any other issues!

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 30, 2025, 5:04am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/8 "2025-01-30T05:04:13Z")

</div>

Dear Victor,

Could you please send me back the metadata with the dates formatted as YYYY-MM-DD? I tried to fix it myself, but I encountered some difficulties. Additionally, I would like to have a tree that includes dated branches and incorporates the Nextstrain graph that shows the different clades over time.

Thank you very much!

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 30, 2025, 5:30pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/9 "2025-01-30T17:30:43Z")

</div>

Hi @alfredobrunoc,

Removing the `date_submitted` column allows the workflow to run successfully. You should keep the `date` column to infer the time tree. The default tree with your config file should already show a tree colored by clade over time. Can you try again with just removing the `date_submitted` column?

– Victor

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 30, 2025, 10:53pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/11 "2025-01-30T22:53:04Z")

</div>

The message

```plaintext
ERROR: Alignment must have at least 3 sequences

```

means there is likely an issue with one of the earlier steps removing your sequences from the analysis. Can you share the information in the files `logs/filtered_default-build.txt`, `logs/subsample_default-build_all.txt`, and the config.yaml you are using? It works fine for me with this one:

```auto
# Format reference: <https://docs.nextstrain.org/projects/ncov/page/reference/workflow-config-file.html>

inputs:
  - name: reference_data
    metadata: data/ANDINOS.tsv
    sequences: data/ANDINOS.fasta

# GenBank data includes "Wuhan-Hu-1/2019" which we use as the root for this build.
refine:
  root: "Wuhan/Hu-1/2019"

filter:
  min_length: 20000

```

Those files should be safe to share, but I still see potentially sensitive data in the files you have shared so far. I suggest editing the posts to remove these files. Let me know if you need help with that.

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 31, 2025, 12:05am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/12 "2025-01-31T00:05:10Z")

</div>

Dear Victor

Thank you very much for your response, please find attached the files and my config.yaml It is outside the data directory but inside ncov.

[subsample\_default-build\_all.txt](https://nextstrain.discourse.group/uploads/short-url/3erREnvmP1kllP9SPYEl4dAc6uu.txt) (141 Bytes)

[filtered\_default-build.txt](https://nextstrain.discourse.group/uploads/short-url/6822EoXRVLISo88ZVgXH3jJ4UK2.txt) (511 Bytes)

Best regards,

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 31, 2025, 12:05am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/13 "2025-01-31T00:05:44Z")

</div>

and this is the config.yaml  
[config.yaml](https://nextstrain.discourse.group/uploads/short-url/1BGMr4HuXla2APLiFjh3gqSQUqW.yaml) (362 Bytes)

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 31, 2025, 12:37am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/14 "2025-01-31T00:37:52Z")

</div>

The issue is apparent from the `filtered_default-build.txt` file:

```plaintext
2293 of these were dropped because they were earlier than 2019.92 or missing a date

```

The values in the `date` column have changed since your first post. You should keep them as `YYYY-MM-DD` format. For example, the `Wuhan/Hu-1/2019` sequence should have `date` = `2019-12-26` however it has changed to `26-12-19` in your last upload and same for all the other sequences. It should work if you restore the original `date` column.

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 31, 2025, 2:11am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/15 "2025-01-31T02:11:48Z")

</div>

Thank you very much Victor, it seems that my Excel was automatically transforming to another format and that is why it did not allow me to run but I opened it with open office and it ran, now how can I view the results, I go to the results folder but I see several directories: custom-build, default-build, translations, and more files within each one, how could I visualize the results of the tree with colors, the lineage distribution graph over time and the main results? Thank you once again for all your patience and help.

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 31, 2025, 2:18pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/16 "2025-01-31T14:18:26Z")

</div>

Dear Victor,

I used `nextstrain view auspice/` and was able to see the results. However, in the Frequencies panel (colored by PANGO Lineage), all the lineages are displayed in grey. How can I get them to be colored by lineage? Currently, only 23I appears in color, and I would like to show the diversity of the lineages in Andean countries.

Thank you!

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 31, 2025, 6:43pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/17 "2025-01-31T18:43:48Z")

</div>

I am slightly confused. Are you using PANGO Lineage or Nextstrain Clade? 23I is a Nextstrain Clade. In either case, non-grey colors are assigned to values defined in the file [`defaults/color_ordering.tsv`](https://github.com/nextstrain/ncov/blob/8beaf391856d81907c1ea1741602034e454b8bc7/defaults/color_ordering.tsv#L34040). It is a large file, but some of the relevant lines are:

```plaintext
…
clade_membership	23I (BA.2.86)
clade_membership	24A (JN.1)
clade_membership	24B (JN.1.11.1)
…
pango_lineage	JN.1.4
pango_lineage	JN.1.4.1
pango_lineage	JN.1.4.4
…

```

Note that the metadata values must match exactly for a color to be applied. For example, a `pango_lineage` value of `JN.1.4 (consensus call)` will not match `JN.1.4`.

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 31, 2025, 10:24pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/18 "2025-01-31T22:24:14Z")

</div>

Dear Victor. Now use the GISAID download but when analyzing the clades or lineages since 2020 only one color appears and that worries me. The result is reflected here: [http://127.0.0.1:4000/ncov/default-build](http://127.0.0.1:4000/ncov/default-build)  
I attach files in case you can help me because one of the most important points that I want to reflect is with colors the different clades over time in the countries but this is difficult for me how can I fix it?

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [January 31, 2025, 10:34pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/19 "2025-01-31T22:34:15Z")

</div>

Can you attach a screenshot? It’s hard to tell what you are seeing. The link you provided will only work on your computer.

I think it’s best to not share GISAID files publicly, I suggest removing from your post.

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 31, 2025, 11:47pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/20 "2025-01-31T23:47:50Z")

</div>

![image](https://canada1.discourse-cdn.com/flex031/uploads/nextstrain/original/1X/5d9cd95960dbffc5d78e3ae32cc03cbee1f749e9.jpeg)  
[COLOR BY.pdf.docx](https://nextstrain.discourse.group/uploads/short-url/slXJGqO6MafRQIJUC4C1khmMZXk.docx) (1.2 MB)

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [January 31, 2025, 11:49pm UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/21 "2025-01-31T23:49:08Z")

</div>

I would like to see the different clades by colour from 2020

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [February 1, 2025, 12:31am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/22 "2025-02-01T00:31:26Z")

</div>

What you are seeing is a reflection of the values in your metadata file for the sequences on the tree.

If this is not what you are expecting, that means your data is being filtered to just a single clade/lineage. This could be due to mismatch between metadata and sequences files. You should check that each ID has an entry in both metadata TSV and sequences FASTA. It could also be due to sampling method, if your config file has changed since the last time it was shared.

Overall, it would be easier for others to debug issues if you share all files in the `logs/` folder. These should be safe to share.

---

<div class="post-metadata">

**Author:** ![alfredobrunoc](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alfredobrunoc](https://nextstrain.discourse.group/u/alfredobrunoc)\
**Post date:** [February 1, 2025, 1:14am UTC](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822/23 "2025-02-01T01:14:11Z")

</div>

Which of the log files can I share with you? There are too many and I can’t upload them all?

[export\_default-build.txt](https://nextstrain.discourse.group/uploads/short-url/fGTcHlgW30REr13VpQBqBTVbEWQ.txt) (62.5 KB)  
[emerging\_lineages\_default-build.txt](https://nextstrain.discourse.group/uploads/short-url/kYkXZRw8YdcQ3mHKbNgcdhAsgwz.txt) (2.2 KB)

[Next page](https://nextstrain.discourse.group/t/trouble-with-sars-cov-2/1822.md?page=2)
