torognes / swarm

A robust and fast clustering method for amplicon-based studies
GNU Affero General Public License v3.0
121 stars 23 forks source link

swarm output file #118

Closed tilaknayak closed 5 years ago

tilaknayak commented 5 years ago

I am a new user of swarm, after i run the swarm (code ./swarm -f -t 2 -z -o myfile.txt -w myfile.representatives.fasta amplicons_linearized_dereplicated.fasta myfile.swarms) i got a file like that

P11.496;size=1426; P11.370;size=1162; P11.296;size=1158; P11.418;size=901; P11.1153;size=842; P11.108;size=772; P11.469;size=554; P11.3485;size=331; P11.119;size=130; P11.2464;size=108; P11.5139;size=52; P11.161963;size=39; P11.42759;size=37; P11.22806;size=31; P11.595;size=29; P11.42703;size=27; P11.8313;size=27; P11.7145;size=25; P11.3383;size=24; P11.44670;size=17; P11.57536;size=16; P11.1587;size=14; P11.65743;size=11; P11.57863;size=8; P11.25311;size=7; P11.167457;size=6; P11.66950;size=6; P11.3620;size=5; P11.52385;size=5; P11.76267;size=5; P11.87618;size=5; P11.114824;size=4; P11.11757;size=4; P11.1182;size=4; P11.30876;size=4; P11.4521;size=4; P11.58180;size=4; P11.61547;size=4; P11.63706;size=4; P11.6975;size=4; P11.86352;size=4; P13.19696;size=4; P11.117541;size=3;

now my question is is that file is okay because i don't know how output file look and 2nd question from this how i deal with the statistical analysis because i don't understand the otu cluster value and otu number. kindly reply me.

frederic-mahe commented 5 years ago

dear @tilaknayak sorry for the delay in answering you. I took some early vacation this year.

Your swarm command seems OK (except you can drop myfile.swarms, this is redundant with the -o option:

./swarm \
    -f \
    -t 2 \
    -z \
    -o myfile.txt \
    -w myfile.representatives.fasta \
    amplicons_linearized_dereplicated.fasta

The results you obtain seem normal too. swarm is a clustering method, it takes fasta sequences and tells you what are the clusters (i.e. the groups of sequences) that make sense. That's all swarm does.

After the clustering with swarm, there are still a few steps you need to perform before obtaining an OTU table you can analyze with R packages such as vegan or phyloseq. If you are interested, here is a page where I describe how I use swarm and other tools for my own research projects.

frederic-mahe commented 5 years ago

@tilaknayak I am closing that issue. Feel free to open a new issue if you have another question.

tilaknayak commented 5 years ago

Hello sir now I am facing with a different problem. I am trying to build a contingency table for amplicon with this script (python amplicon_contingency_table.py P11_dereplicated.fasta > amplicons_table.csv) and I got an error. Please help me to solve this error. I give the details of this error bellow. pkd@pkd-HP-406-G1-MT:~/swarm-master/scripts$ python amplicon_contingency_table.py P11_dereplicated.fasta > amplicons_table.csv Traceback (most recent call last): File "amplicon_contingency_table.py", line 101, in main() File "amplicon_contingency_table.py", line 65, in main all_amplicons, amplicons2samples, samples = fasta_parse() File "amplicon_contingency_table.py", line 41, in fasta_parse amplicon, abundance = line.strip(">;\n").split(separator) ValueError: need more than 1 value to unpack

Thanking you. From Tilak Nayak

On Wed, Jan 16, 2019 at 7:27 PM Frédéric Mahé notifications@github.com wrote:

Closed #118 https://github.com/torognes/swarm/issues/118.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/torognes/swarm/issues/118#event-2077463100, or mute the thread https://github.com/notifications/unsubscribe-auth/Ar1JWsDxPWnQldXBtXXtldOgxO6nsEoHks5vDy_DgaJpZM4ZXr_0 .