question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with dropEst->velocyto workflow

See original GitHub issue

I’ve been trying to follow your vignette for analyzing Drop-seq data with dropEst, then running velocyto. However I’ve encountered an error during dropest_bc_correct that I can’t seem to navigate around.

Here’s what I’ve tried:

droptag -c ~/dropEst/configs/drop_seq.xml R1.fastq.gz R2.fastq.gz -n N714_droptag

STAR --genomeDir ~/STAR_indexes/hg38-mm10/ --readFilesIn N714_droptag.fastq.gz --outSAMmultNmax 1 --runThreadN 8 --readNameSeparator space --outSAMunmapped Within --outSAMtype BAM SortedByCoordinate --outFileNamePrefix N714_droptag --readFilesCommand gunzip -c

dropest -m -V -b -o N714_dropest -g gencode_mm10-vM22_hg38-v31.gtf -L eiEIBA -c ~/dropEst/configs/drop_seq_velocyto.xml N714_droptagAligned.sortedByCoord.out.bam

velocyto tools dropest_bc_correct N714_droptagAligned.sortedByCoord.out.tagged.bam N714_dropest.rds

Everything runs to completion except the dropest_bc_correct command, which produces the following error:

2019-10-10 11:18:54,548 - INFO - Loading `merge_targets` from N714_dropest.rds using R / rpy2
Traceback (most recent call last):
 File "~/.local/bin/velocyto", line 11, in <module>
   load_entry_point('velocyto==0.17.17', 'console_scripts', 'velocyto')()
 File "~/python/3.6.6/lib/python3.6/site-packages/click/core.py", line 716, in __call__
   return self.main(*args, **kwargs)
 File "~/python/3.6.6/lib/python3.6/site-packages/click/core.py", line 696, in main
   rv = self.invoke(ctx)
 File "~/python/3.6.6/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
   return _process_result(sub_ctx.command.invoke(sub_ctx))
 File "~/python/3.6.6/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
   return _process_result(sub_ctx.command.invoke(sub_ctx))
 File "~/python/3.6.6/lib/python3.6/site-packages/click/core.py", line 889, in invoke
   return ctx.invoke(self.callback, **ctx.params)
 File "~/python/3.6.6/lib/python3.6/site-packages/click/core.py", line 534, in invoke
   return callback(*args, **kwargs)
 File "~/.local/lib/python3.6/site-packages/velocyto/commands/dropest_bc_correct.py", line 64, in dropest_bc_correct
   mapping = convert_r_obj(ro.r(f"rds <- readRDS('{filename}'); rds$merge_targets"))  # a dict
UnboundLocalError: local variable 'convert_r_obj' referenced before assignment

Note that specifying the -f flag for dropEst as you recommend elsewhere fails and produces empty files (no valid CBs found).

Do you have any recommendations on how to get around this issue?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
bettycatherinecommented, Dec 28, 2021

I encountered the exact same issues mentioned, and I found a solution. The first problem, “UnboundLocalError: local variable ‘convert_r_obj’ referenced before assignment”, occurred because I did not install velocyto perfectly. Reinstall it will solve the problem. Second, “AttributeError: module ‘rpy2.rinterface’ has no attribute ‘RNULLType’” is because that script of rpy2 after version 3.0.0 have totally rewrite, so we have to install version before rpy2 3.0.0. The third problem. I have mentioned in #298.

So, to solve these problems. first of all you have to create a conda evironment with python <=3.6, then conda install rpy2=2.9.4, which will install R3.6.0 simultaneously, then install the packages in velocyto tutorials, and do not forget pysam. Modify the py files and everything goes fine with the pipeline with some easy-fixed bugs.

0reactions
mtekmancommented, Jul 29, 2020

So I can get around this issue by installing rpy2 in my environment (I had to dig around the source to find this), but now it errors out with AttributeError: module 'rpy2.rinterface' has no attribute 'RNULLType', which upon some searching led to this issue that suggests installing a specific version of rpy2.

Doing: pip3 install rpy2==2.9.5 appears to fix this problem

But now I am stuck on a KeyError: "tag 'CB' not present" error – but this is another issue altogether

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot common workflow errors
In your HubSpot account, navigate to Automation > Workflows. Click the Workflows with errors tab. Hover over the workflow, then click Edit.
Read more >
Workflow errors - Google Cloud
Errors for Workflows might be raised, for example, by failed HTTP requests, functions, connectors, or generated by your own workflow code.
Read more >
Common Workflows errors - Okta Documentation
At runtime, Workflows can emit a number of error types to point out problems when you're executing your Flows. This table describes Workflows...
Read more >
Unable to activate any Process: Error ID - Salesforce Help
This error occurs when your organization has hit the limit on the maximum number of workflow rules per object. There are two options...
Read more >
Solved: on selected message see error "Workflow did not co...
Solved: on selected message see error "Workflow did not complete its run" Today, when i try to open some of my flow the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found