Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BiG-MAP.map.py Biom error #14

Open
AKBode opened this issue Nov 17, 2021 · 5 comments
Open

BiG-MAP.map.py Biom error #14

AKBode opened this issue Nov 17, 2021 · 5 comments

Comments

@AKBode
Copy link

AKBode commented Nov 17, 2021

Hi BiG-MAP developer

Thanks for developing the tool for the community.

I ended up with an error when running BiG-MAP.map for both metagenome and metatranscriptome data. One error example is listed down below. Any idea how to fix the error?

python3 $HOME/BiG-MAP/src/BiG-MAP.map.py -b $HOME/bigmap_input/mtx_S.txt -U /scratch1/users/MTX_filtered/*fastq.gz -O /scratch1/users/bigmap_output/results_mapping_MTX_hmg_ref_cf02_S/ -F $HOME/bigmap_output/results_family_genomes_cf02_mtx/ -th 64 -a True

Adding metadeta to biom and converting files into json format
Traceback (most recent call last):
File "/usr/users/BiG-MAP/src/BiG-MAP.map.py", line 1124, in
main()
File "/usr/users/BiG-MAP/src/BiG-MAP.map.py", line 1088, in main
biom_out1 = decoratebiom(biomfile, args.outdir, args.biom_output)
File "/usr/users/BiG-MAP/src/BiG-MAP.map.py", line 780, in decoratebiom
res_add = subprocess.check_output(cmd_sample, shell=True)
File "/usr/users/.conda/envs/BiG-MAP_process/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/users/.conda/envs/BiG-MAP_process/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'biom add-metadata -i /scratch1/users/bigmap_output/results_mapping_MTX_hmg_ref_cf02_S/BiG-MAP.map.biom -o /scratch1/users/bigmap_output/results_mapping_MTX_hmg_ref_cf02_S/BiG-MAP.map.meta.biom -m /usr/users/bigmap_input/mtx_S.txt --output-as-json' returned non-zero exit status 1

@victoriapascal
Copy link
Collaborator

Thanks for posting this here. Indeed, the BIOM step can be sometimes problematic. I would suggest to first check the metadata file is properly formatted: tab separated, ids matching the sample ids, first line starts with "#"... Unfortunately, we can not reproduce this error as this might be specific to your file/dataset. If the file is correctly formatted do you mind sharing the metadata file you are using with us?

@mhyleung
Copy link

mhyleung commented Dec 16, 2021

Hi thanks for the response.

I made a silly mistake. I actually directed my metadata file to the wrong directory, and the resulting json file generated had no information. That's why it did not work for me. Sorry for the confusion.

I went back to changed the directory path and it worked. Thanks

@AKBode
Copy link
Author

AKBode commented Dec 31, 2021

Thanks for posting this here. Indeed, the BIOM step can be sometimes problematic. I would suggest to first check the metadata file is properly formatted: tab separated, ids matching the sample ids, first line starts with "#"... Unfortunately, we can not reproduce this error as this might be specific to your file/dataset. If the file is correctly formatted do you mind sharing the metadata file you are using with us?

Hi Victoria,

I've double-checked the potential issues you mentioned. Things look fine and I still ended with the same error. Do you mind giving me your email? I'd share the files with you. Thank you.

@victoriapascal
Copy link
Collaborator

Sure. You can use the following email address: [email protected]

@AKBode
Copy link
Author

AKBode commented Feb 6, 2022

I've resolved the issue by removing the flag "-a True"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants