# Training a V4 database from a reference

**URL:** <https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315>\
**Category:** Theory behind mothur\
**Created:** [February 10, 2020, 11:18pm UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315 "2020-02-10T23:18:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gollison](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gollison](https://forum.mothur.org/u/gollison)\
**Post date:** [February 10, 2020, 11:18pm UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315/1 "2020-02-10T23:18:43Z")

</div>

I trimmed a full length ‘seed’ reference to the V4 region using the blog on customization as follows:  
Commands below:

1. Short perl script (yes, perl…) to pull the V4 region from one full length SSU acantharia. Output as Acantharia\_V4.fasta.
2. align.seqs(fasta=Acantharia\_V4.fasta, reference=silva.seed\_v132.align)
3. summary.seqs(fasta=Acantharia\_V4.align)
4. pcr.seqs(fasta=silva.seed\_v132.align, start=6388, end=13861, keepdots=FALSE)
5. Rename and format using bash (sed)

After trimming to the V4 region, none of my reads aligned to the trimmed V4 version. I then tried aligning to the full-length reads seed and got the same results; no alignments. However, when I try assigning taxonomy using the regular full length silva database, things work just fine.

Any troubleshooting advice? My end goal is to produce a V4 reference for taxonomic assignments. Preferably out of a database that comes with a taxonomy .txt file as both are required for taxonomic assignment.

Salute,  
G

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 11, 2020, 4:25pm UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315/2 "2020-02-11T16:25:57Z")

</div>

What is the output from running `summary.seqs(fasta=Acantharia_V4.align)`?

---

<div class="post-metadata">

**Author:** ![gollison](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gollison](https://forum.mothur.org/u/gollison)\
**Post date:** [February 12, 2020, 10:50pm UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315/3 "2020-02-12T22:50:07Z")

</div>

seqname start end nbases ambigs polymer mumSeqs  
KC172865.1 14291 22553 408 0 5 1

I used the correct coords in pcr seqs.  
mothur \> pcr.seqs(fasta=silva.seed\_v132.align, start=14291, end=22553, keepdots=False)

This produced a file called silva.seed\_v132.pcr.align, which contained a lot of dots and dashes and the number 100 between the ID and taxonomy that I removed using bash at the same time renaming the file.

> AY217654.EscSeneg 100 Bacteria;Proteobacteria;Gammaproteobacteria;Enterobacteriales;Enterobacteriaceae;Kosakonia;  
> …C–G---------ΑA, etc

> sed ‘s/-//g’ Test.pcrfile.fasta | sed ‘s/..//g’ | sed ‘s/.CG/CG/g’ | sed ‘s/ 100 //g’ \> V4\_silva.fasta

Then I attempted to classify taxonomy using this V4\_silva.fasta and the silva.seed\_v132.tax file.

Everything was ‘Unknown’ using the V4\_silva.fasta

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 13, 2020, 1:26pm UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315/4 "2020-02-13T13:26:16Z")

</div>

What’s the output **to the screen** from running `summary.seqs`?

---

<div class="post-metadata">

**Author:** ![gollison](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gollison](https://forum.mothur.org/u/gollison)\
**Post date:** [February 14, 2020, 2:21am UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315/5 "2020-02-14T02:21:16Z")

</div>

Using 128 processors.

Start End NBases Ambigs Polymer NumSeqs

Minimum: 14291 22553 408 0 5 1

2.5%-tile: 14291 22553 408 0 5 1

25%-tile: 14291 22553 408 0 5 1

Median: 14291 22553 408 0 5 1

75%-tile: 14291 22553 408 0 5 1

97.5%-tile: 14291 22553 408 0 5 1

Maximum: 14291 22553 408 0 5 1

Mean: 14291 22553 408 0 5

# of Seqs: 1

It took 0 secs to summarize 1 sequences.

Output File Names:

Acantharia\_V4.summary

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [February 14, 2020, 1:28pm UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315/6 "2020-02-14T13:28:41Z")

</div>

Thanks - a few questions…

1. Are you positive that you have V4 sequences?
2. What happens when you classify the Acantharia\_V4.fasta file against your trimmed version of the silva database?
3. What’s the closest Acantharia seqeunce in the silva\_seed database?

My concern is that you either don’t really have V4 sequences or that the database has poor representation of the Acantharia. You might try to repeat the `pcr.seqs` and following steps using the silva.nr\_v132, which will have more sequences in it.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/system/32/2_2.png) [@system](https://forum.mothur.org/u/system)\
**Post date:** [February 24, 2020, 1:28pm UTC](https://forum.mothur.org/t/training-a-v4-database-from-a-reference/20315/7 "2020-02-24T13:28:42Z")

</div>

Closed on February 24, 2020, 1:28pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
