Limit to number of Samples

26 views
Skip to first unread message

Samuel Major

unread,
Jul 25, 2016, 10:13:19 PM7/25/16
to Qiime 1 Forum
Hi, 
I wanted to split my otu table and ran the split_otu_table.py command and recieved the error:

shared_samples = list(set(mdata[:, 0]).intersection(bt.ids(axis='sample')))
IndexError: too many indices for array

This gave me the idea that I may have too much going on in the mapping file. so I tried to validate it:

validate_mapping_file.py -m 16S_18S/16S_18S_map.txt -o 16S_18S/map_val -b --not_barcoded
...
 if len(mapping_data[curr_data][curr_ix]) == 0:
IndexError: list index out of range

I currently have 48 samples (16S and 18S). I'll have 46 after I remove any contamination and any erroneous samples. 
Is there a limit to the number of samples that a mapping file can carry? I've used up to 25 samples thus far in other analyses.

Thanks
Sam

Justine Debelius

unread,
Jul 26, 2016, 11:15:08 AM7/26/16
to Qiime 1 Forum
Hi Samuel,

I've used the split_otu_table.py on the American Gut data when it was at about 5000 samples using a MacBook. 

Sometimes, I've gotten this kind of error (or similar behavior) because QIIME detects an extra row in my mapping file. If you've used Excel and currently have a text file, you need to open it as text. If you're working on a Mac, you can do this by opening the file using the File -> Open, and then going through the import menu. Select all your columns as text. (This will make sure you don't have any changes in your mapping file, like inference around zipcode). I think the same is true of windows and Open Office, but I haven't tried it.

Then, highlight maybe 20 cells below your last sample, and delete those rows. I typically to this three or four times, just to be sure. I'll do the same thing with columns.

Thanks,
Justine

Samuel Major

unread,
Jul 26, 2016, 10:55:38 PM7/26/16
to Qiime 1 Forum
Hi Justine,
Thanks for the advice. I tried a few of your suggestions and re-running the split_otu_table.py command again and received the same error. However, I then tried validating it and re-running the command with the validated X_corrected.txt file and it seemed to have done the trick. 
I appreciate the help tremendously!
Sam
Reply all
Reply to author
Forward
0 new messages