cluster command won't work in script mode

When I run the cluster command in my perl script, mothur will try to run for a few minutes, then times out.

`$mothur \"#cluster(column=/home/neilsharma/$run_directory/stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.filter.dist, count=/home/neilsharma/$run_directory/stability.trim.contigs.good.unique.good.filter.unique.precluster.count_table)\"`;
Linux version

Using ReadLine

Running 64Bit Version

mothur v.1.39.5
Last updated: 3/20/2017

by
Patrick D. Schloss

Department of Microbiology & Immunology
University of Michigan
http://www.mothur.org

When using, please cite:
Schloss, P.D., et al., Introducing mothur: Open-source, platform-independent, community-supported software for describing and comparing microbial communities. Appl Environ Microbiol, 2009. 75(23):7537-41.

Distributed under the GNU General Public License

Type 'help()' for information on the commands that are available

For questions and analysis support, please visit our forum at https://www.mothur.org/forum

Type 'quit()' to exit program
Script Mode

Notice that it does start mothur, but doesn’t seem to find the command. (Hence why it’s not printed to the logfile)

I should also add that I’ve execute many prior commands in script mode, have double checked the syntax, but still can’t get it to execute.

Can someone confirm this? Just to be sure I’m not doing something incorrect on my end.

I copy/pasted your command and got it to work fine if I removed the ‘`’ characters which I am guessing were just for formatting for posting on this forum? When I say it worked fine I mean it tried to run, but failed because I don’t have the files listed in the command.

I tested this on the 64-bit windows build of mothur 1.39.5

Hope that helps some.

Richard

I use bash rather than perl, but this is working for me

mothur "#cluster(column=/home/neilsharma/$run_directory/stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.filter.dist, count=/home/neilsharma/$run_directory/stability.trim.contigs.good.unique.good.filter.unique.precluster.count_table)";

Are you sure you have to escape the "?

Hi!

Thanks for the responses! I downgraded to version 1.39.3 and got the cluster command to start, but then it dies ~10minutes in without any error and moves on the next command in my script. What’s interesting is I got this command to work on a centos-release-6-6.el6.centos.12.2.x86_64. The system it’s failing on is Ubuntu 16.04.2, but it’s on a SSD drive. Would the SSD drive effect the ‘cluster command’?

logfile below

Linux version

Using ReadLine

Running 64Bit Version

mothur v.1.39.3
Last updated: 2/23/2017

by
Patrick D. Schloss

Department of Microbiology & Immunology
University of Michigan
http://www.mothur.org

When using, please cite:
Schloss, P.D., et al., Introducing mothur: Open-source, platform-independent, community-supported software for describing and comparing microbial communities. Appl Environ Microbiol, 2009. 75(23):7537-41.

Distributed under the GNU General Public License

Type 'help()' for information on the commands that are available

For questions and analysis support, please visit our forum at https://www.mothur.org/forum

Type 'quit()' to exit program
Script Mode


mothur > cluster(column=/home/neilsharma/161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.filter.dist, count=/home/neilsharma/161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.count_table)

Using 1 processors.
[NOTE]: Default clustering method has changed to opti. To use average neighbor, set method=average.

We haven’t heard any problems with people using 1.39.5 for clustering. How big is your distance matrix and what was the command you used to generate it?

Hey! So the mystery continues. Both distance files are 223G, but the cluster command fails on machine we provided nicer hardware.

# Works!
# CentOS6.6- 16gb RAM and 32gb swap
# v1.39.3
mothur > cluster(column=/home/mpiuser/161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.filter.dist, count=/home/mpiuser/161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.count_table)
223G 161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.filter.dist

# Doesn't work!
# Ubuntu 16.04.2- 72gb RAM and a 72gb swap
# cluster command dies ~ 10minutes in. v1.39.3
mothur > cluster(column=/home/neilsharma/161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.filter.dist, count=/home/neilsharma/161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.count_table)
223G 161219_ILM001_WaterSamples/stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.filter.dist

Can you use cutoff=0.03 in dist.seqs and then use the default method in cluster?