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

getting NoneType vs int error in clustering step #101

Open
hyphaltip opened this issue Oct 18, 2023 · 0 comments
Open

getting NoneType vs int error in clustering step #101

hyphaltip opened this issue Oct 18, 2023 · 0 comments

Comments

@hyphaltip
Copy link
Contributor

Getting this error

Traceback (most recent call last):
  File "/opt/linux/rocky/8.x/x86_64/pkgs/amptk/1.6/bin/amptk", line 8, in <module>
    sys.exit(main())
  File "/bigdata/operations/pkgadmin/opt/linux/centos/8.x/x86_64/pkgs/amptk/1.6/lib/python3.10/site-packages/amptk/amptk.py", line 784, in main
    mod.main(arguments)
  File "/bigdata/operations/pkgadmin/opt/linux/centos/8.x/x86_64/pkgs/amptk/1.6/lib/python3.10/site-packages/amptk/OTU_cluster.py", line 190, in main
    numKept, numDropped = amptklib.validateorientation(tmp, sort_out, uchime_out, passingOTUs)
  File "/bigdata/operations/pkgadmin/opt/linux/centos/8.x/x86_64/pkgs/amptk/1.6/lib/python3.10/site-packages/amptk/amptklib.py", line 1450, in validateorientation
    if qCount > tCount:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
[08:46:43 PM]: OS: Rocky Linux 8.8, 96 cores, ~ 527 GB RAM. Python: 3.10.0

This is because qCount is None not 0?

qCount = OTUCounts.get(cols[0])

Running this command

amptk cluster -i $BASE.demux.fq.gz -o $BASE --uchime_ref 16S --usearch usearch9 --map_filtered -e 0.9 --cpus $CPU --unoise

but I think also seen even if --unoise is left off? maybe we have some low abundance OTUs that end up with 0 mapping when re-mapped?

amptk cluster -i $BASE.demux.fq.gz -o $BASE --uchime_ref 16S --usearch usearch9 --map_filtered -e 0.9 --cpus $CPU 

I have a fix which seems to work and will submit a pull for this but curious if reason why qCount would be None instead of 0 as a data error or just an untested condition?

hyphaltip added a commit to hyphaltip/amptk that referenced this issue Oct 18, 2023
nextgenusfs added a commit that referenced this issue Nov 6, 2023
fix for bug #101 where qCount is None not 0
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

1 participant