# Dist.seqs (set RAM?)

**URL:** <https://forum.mothur.org/t/dist-seqs-set-ram/19774>\
**Category:** Commands in mothur\
**Created:** [March 20, 2019, 2:45pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774 "2019-03-20T14:45:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![joelio1616](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@joelio1616](https://forum.mothur.org/u/joelio1616)\
**Post date:** [March 20, 2019, 2:45pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/1 "2019-03-20T14:45:00Z")

</div>

Hi there,

TL;DR version.

- not looking at microbiome, but songbird MHC (highly duplicated genes in this taxon)
- can only use 1 processor for dist.seqs because mothur will use all 24gb of RAM on my PC and shut down if I ask the program to use more than one processor
- have to use 0.0 for cut-off because one SNP may be of importance
- filtered aligned FASTA file has ~2.3 million sequences
- dist.seqs has been running for days, but has stopped at sequence 390,800
- can you designate how much RAM for dist.seq to use, so mothur won’t close? Also, to allow me to use more processors?

* * *

I’m using mothur to determine individual MHC genes per individual, in this case, a songbird. In a sense, you can consider each individual as a bacterial community, and each MHC allele as an OTU. Since songbirds have incredibly diverse MHC class II allele repertoires, I need to use a program such as mothur.

So far I have tailored the MiSeq SOP to my MHC analysis, however, I am running into trouble at _dist.seqs_ – the reason being is my computer has 8 processors and 24 gb of RAM, and if I run any higher than 1 processor, it will max out the RAM and shut down mothur. It’s also important to note, that I cannot have a cutoff value as even a SNP may be important in determining allelic variation at MHC, so I had to set it to 0.

Is there any way to tell this command to use a set amount of RAM so it won’t shut down, but it will also speed up? The filtered aligned FASTA file has roughly 2.3 million sequences, and it has stalled at 390,800.

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![joelio1616](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@joelio1616](https://forum.mothur.org/u/joelio1616)\
**Post date:** [March 20, 2019, 10:24pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/2 "2019-03-20T22:24:14Z")

</div>

Consider this resolved! I’m going to have to have to use a server for sure.

---

<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:** [March 21, 2019, 4:56pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/3 "2019-03-21T16:56:16Z")

</div>

If you’re using a threshold of 0, you should be able to use [make.shared](https://mothur.org/wiki/Make.shared) with a count file:

```auto
mothur > make.shared(count=amazon.count_table, label=0.03)

```

That should be considerably lighter and will not require `dist.seqs` or `cluster`.

---

<div class="post-metadata">

**Author:** ![joelio1616](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@joelio1616](https://forum.mothur.org/u/joelio1616)\
**Post date:** [March 21, 2019, 5:21pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/4 "2019-03-21T17:21:46Z")

</div>

Hi Pat,

Apologies if this is an overly simple question – still new to using mothur.

With my filtered and aligned file, I was having difficulty trying to find the commands to remake a count table that contains the new (and less) sequences. I see one prior to these commands (formed at the start of the MiSeq SOP).

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![joelio1616](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@joelio1616](https://forum.mothur.org/u/joelio1616)\
**Post date:** [March 28, 2019, 1:49pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/5 "2019-03-28T13:49:57Z")

</div>

So I was able to create a shared file. Thank you. However, how would I go about cross-referring the OTU names with the sequences? Which are named in this format: “M03127\_554\_000000000-C89WG\_1\_2111\_6953\_9784”

Thanks!

---

<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:** [March 28, 2019, 2:49pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/6 "2019-03-28T14:49:17Z")

</div>

Those would be in the list file generated in the cluster commands.

---

<div class="post-metadata">

**Author:** ![joelio1616](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@joelio1616](https://forum.mothur.org/u/joelio1616)\
**Post date:** [April 3, 2019, 9:52pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/7 "2019-04-03T21:52:02Z")

</div>

This helped greatly! Thank you. The one issue I am having is the vast amount of OTUs (1.4 million) – which are probably mainly singletons among my samples. I found some information regarding singletons in the clustering wiki, however, I’m not too sure if that’s what I need to do. Is there a way to eliminate all of your singleton OTUs in a shared file? Due to having so many columns, I cannot open the file in a program without it stalling or shutting down.

---

<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:** [April 13, 2019, 9:55pm UTC](https://forum.mothur.org/t/dist-seqs-set-ram/19774/8 "2019-04-13T21:55:15Z")

</div>

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