Skip to content

Error after not finding pre-training models (ir.dill) #21

@ivandatasci

Description

@ivandatasci

Hello everyone.

I just installed the latest cello-classify version with pip. Version 2.0.3. Installation went fine.

When I try to use it, I get an error.

I execute this cell in a JupyterLab notebook:

cello.scanpy_cello(adata0a,
                   clust_key='leiden',
                   rsrc_loc='/mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130',
                   out_prefix='/mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130/cello_model00',
                   log_dir='/mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130')

and this is the error:

       Could not find the CellO resources directory called
        'resources' in '/mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130'. Will download resources to current 
        directory.
        
Running command: curl http://deweylab.biostat.wisc.edu/cell_type_classification/resources_v2.0.0.tar.gz > /mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130/resources_v2.0.0.tar.gz
Running command: tar -C /mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130 -zxf resources_v2.0.0.tar.gz
Running command: rm /mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130/resources_v2.0.0.tar.gz
Checking if any pre-trained model is compatible with this input dataset...
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-45-2570c77cb08a> in <module>
      4 #sc.pp.neighbors(adata0a, n_neighbors=15)
      5 #sc.tl.leiden(adata0a, resolution=2.0)
----> 6 cello.scanpy_cello(adata0a,
      7                    clust_key='leiden',
      8                    rsrc_loc='/mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130',

/usr/local/lib/python3.9/site-packages/cello/scanpy_cello.py in cello(adata, clust_key, rsrc_loc, algo, out_prefix, model_file, log_dir, term_ids, remove_anatomical_subterms)
    127     else:
    128         # Load or train a model
--> 129         mod = ce._retrieve_pretrained_model(adata, algo, rsrc_loc)
    130         if mod is None:
    131             mod = ce.train_model(

/usr/local/lib/python3.9/site-packages/cello/cello.py in _retrieve_pretrained_model(ad, algo, rsrc_loc)
    329                 model_fname
    330             )
--> 331             with open(model_f, 'rb') as f:
    332                 mod = dill.load(f)
    333             feats = mod.classifier.features

FileNotFoundError: [Errno 2] No such file or directory: '/mnt/b0/compbio-ebs-01/igr/d0/220317_000000/130/resources/trained_models/ir.dill'

Could somebody offer some guidance?

Thank you.

Ivan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions