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

Error in checkGrep(grep(".A.txt", files)) and Attribute error in 'pulp' #93

Open
davhg96 opened this issue May 23, 2024 · 2 comments
Open
Assignees
Labels

Comments

@davhg96
Copy link

davhg96 commented May 23, 2024

Describe the bug

Hi, Im trying to run mgatk on a tenx run I did using the dogmaseq protocol.
When running:
mgatk tenx -i ./PATHTO/atac_possorted_bam.bam -n mtMSC -o /PATHTOOUT/mtMSC -bt CB -b /PATHTOBarcodes/barcodes.tsv

And I get

`
Thu May 23 15:38:01 CEST 2024: mgatk v0.7.0

Thu May 23 15:38:01 CEST 2024: Found bam file: /3_Data/InVitroDogma/atac_possorted_bam.bam for genotyping.
Thu May 23 15:38:01 CEST 2024: Found file of barcodes to be parsed: ./3_Data/InVitroDogma/barcodes.tsv
Thu May 23 15:38:01 CEST 2024: User specified mitochondrial genome matches .bam file
Thu May 23 15:38:11 CEST 2024: Finished determining/splitting barcodes for genotyping.
Thu May 23 15:38:12 CEST 2024: Genotyping samples with 20 threads
Traceback (most recent call last):
File "/opt/mamba24/bin/snakemake", line 8, in sys.exit(main())
File "/opt/mamba24/lib/python3.10/site-packages/snakemake/init.py", line 2736, in main parser get_argument_parser()
File "/opt/mamba24/lib/python3.10/site-packages/snakemake/init_.py", line 1607, in get_argument_parser lp_solvers pulp.list_solvers(onlyAvailable True)
AttributeError: module 'pulp' has no attribute 'list solvers'. Did you mean: 'ListSolvers'? Improper folder specification; file missing / extra file present. See documentation
Error in checkGrep(grep(".A.txt", files)):

Calls: importMito -> checkGrep
Execution halted`

A summary of .log files
Output of the Log files

cat logs/*log |  

Thu May 23 15:29:28 CEST 2024: Starting analysis with mgatk
Thu May 23 15:29:28 CEST 2024: Processing samples with 20 threads
Thu May 23 15:29:28 CEST 2024: mgatk successfully processed the supplied bam files
Thu May 23 15:29:37 CEST 2024: Successfully created final output files
Thu May 23 15:29:37 CEST 2024: Intermediate files successfully removed.
Thu May 23 15:38:12 CEST 2024: Starting analysis with mgatk
Thu May 23 15:38:12 CEST 2024: Processing samples with 20 threads
Thu May 23 15:38:12 CEST 2024: mgatk successfully processed the supplied .bam files
Thu May 23 15:38:17 CEST 2024: Successfully created final output files
Thu May 23 15:38:17 CEST 2024: Intermediate files successfully removed.

Post an ls -lRh of mgatk_output_folder
ls -IRh final logs qc

Describe the sequencing assay being analyzed
The data was produced using the 10x multiome ATAC + RNA, and the Dogma seq protocol. Looking at the QC there were ~15% Mt reads

Clarify if the execution successful on the test data provided in the repository
Ran the test files in the VM this is the output

mgatk tenx -i barcode/test_barcode.bam -n bc1 -o bc1dmem -bt CB -b barcode/test_barcodes.txt -c 2
Fri May 24 09:57:17 CEST 2024: mgatk v0.7.0
Fri May 24 09:57:18 CEST 2024: Found bam file: barcode/test_barcode.bam for genotyping.
Fri May 24 09:57:18 CEST 2024: Found file of barcodes to be parsed: barcode/test_barcodes.txt
Fri May 24 09:57:18 CEST 2024: User specified mitochondrial genome matches .bam file
Traceback (most recent call last):
File "/opt/mamba24/bin/mgatk", line 8, in
sys.exit(main())
File "/opt/mamba24/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/opt/mamba24/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/opt/mamba24/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/mamba24/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/opt/mamba24/lib/python3.10/site-packages/mgatk/cli.py", line 219, in main
pool = Pool(processes=int(ncores))
File "/opt/mamba24/lib/python3.10/multiprocessing/context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
File "/opt/mamba24/lib/python3.10/multiprocessing/pool.py", line 191, in init
self._setup_queues()
File "/opt/mamba24/lib/python3.10/multiprocessing/pool.py", line 346, in _setup_queues
self._inqueue = self._ctx.SimpleQueue()
File "/opt/mamba24/lib/python3.10/multiprocessing/context.py", line 113, in SimpleQueue
return SimpleQueue(ctx=self.get_context())
File "/opt/mamba24/lib/python3.10/multiprocessing/queues.py", line 341, in init
self._rlock = ctx.Lock()
File "/opt/mamba24/lib/python3.10/multiprocessing/context.py", line 68, in Lock
return Lock(ctx=self.get_context())
File "/opt/mamba24/lib/python3.10/multiprocessing/synchronize.py", line 162, in init
SemLock.init(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/opt/mamba24/lib/python3.10/multiprocessing/synchronize.py", line 57, in init
sl = self._semlock = _multiprocessing.SemLock(
FileNotFoundError: [Errno 2] No such file or directory

Additional context
Version 0.7 running inside a singularity VM. When Running the test files the error is different it seems.

@tybottorff
Copy link

tybottorff commented May 31, 2024

I got a very similar error using mgatk call for bulk ATACseq data if @davhg96 you resolved this perhaps

Update: I actually think I got around this (ran into a different issue) by editing the init.py file's (for me in venv3/lib/python3.9/site-packages/pulp/apis) function definition to rename the function to def list_solvers(onlyAvailable=False): from def listSolvers(onlyAvailable=False):

@danieljrichard
Copy link

This I believe is a bug with 'pulp' - where the newer version has changed the name of a function.
The solution I found working was to down-grade pulp
pip3 install --force-reinstall -v "pulp==2.7"
##confim we down-graded successfully
pip freeze

Now I'm running into different issues though

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

No branches or pull requests

4 participants