jbloomlab / dms_tools2

software for the analysis and visualization of deep mutational scanning data
GNU General Public License v3.0
29 stars 20 forks source link

Question about arguments (--bclen2 10 --bclen 0) #46

Closed tos2014 closed 4 years ago

tos2014 commented 4 years ago

Hello,

I am using the dms2_batch_bcsubamp program to analyze barcoded-amplicon sequencing data stored in fastq.gz files. R1 nucleotide#1 is the start of the sense sequence of my amplicon and R2 nucleotide#1 is the start of the 10-nucleotide degenerate barcode followed by the start of the antisense sequence of my amplicon at nucleotide#11. Each sample has four different amplicons mixed together with the corresponding fasta files for alignment (for example --refseq TIMM23B.txt for my TIMM23B amplicon)

My barcode of ten nucleotides is only on R2, so I used the following arguments: tonysun$ dms2_batch_bcsubamp --refseq TIMM23B.txt --alignspecs 1,432,1,11 --batchfile Batch.csv --summaryprefix ALL --bclen2 10 --bclen 0 --bcinfo

Looking at the log files for each sample, the problem seems to be that --bclen defaults back to 8 for each sample, resulting in a conflict with the --alignspecs parameters of 1,432,1,11. Attached are the error output files for one sample (X1.log), all the samples (ALL.log), and the fasta (TIMM23B.txt)

Traceback (most recent call last): File "/Users/tonysun/dms_tools2/scripts/dms2_bcsubamp", line 146, in main "doen't trim barcode of length {1}".format(r1start, bclen1)) AssertionError: alignspecs has R1START 1, which doen't trim barcode of length 8

ALL.log X1.log TIMM23B.txt

jbloom commented 4 years ago

@tos2014, this was a bug, it is now fixed by pull request #47. The fixed version is 2.6.6. You can upgrade with pip install dms_tools2 --upgrade.

I'm pretty sure this fixes your problem, so am closing this issue. If the problem persists, re-open the issue and post again.

tos2014 commented 4 years ago

After pip install dms_tools2 --upgrade When I run: tonysun$ dms2_batch_bcsubamp I get errors:

raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.VersionConflict: (dms-tools2 2.6.6 (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages), Requirement.parse('dms-tools2==2.6.5'))

raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'dms-tools2==2.6.5' distribution was not found and is required by the application

I tried to search how to resolve this error but can't seem to figure it out. Thanks for fixing the --bclen bug though!

jbloom commented 4 years ago

How did you install dms_tools2 originally?

Perhaps try pip install dms_tools2 without the upgrade option?

You can then check the version with dms2_batch_bcsubamp --version.

tos2014 commented 4 years ago

Originally, installation was done with pip install dms_tools2 --user When I type in: dms2_batch_bcsubamp --version, the same error results. I tried pip install dms_tools2 and am getting many "Requirement already satisfied"

After doing the --upgrade I got:

Installing collected packages: dms-tools2 Found existing installation: dms-tools2 2.6.5 Uninstalling dms-tools2-2.6.5: Successfully uninstalled dms-tools2-2.6.5 Running setup.py install for dms-tools2 ... done Successfully installed dms-tools2-2.6.6

I could try pip uninstall and then reinstall again.

jbloom commented 4 years ago

What happens when you do pip install dms_tools2 --upgrade --user?

tos2014 commented 4 years ago

pip install dms_tools2 --upgrade --user gives the "Requirement already satisfied, skipping upgrade" for each line

jbloom commented 4 years ago

Hmmm, something is messed up with your installation.

I can suggest several possible things to try:

  1. Use a different computer.

  2. Completely uninstall, then just fresh install. You may be able to do this with pip uninstall dms_tools2. Or if you are using a Linux machine maybe you can just delete ~/.local?

  3. Create a conda environment and install in that.

tos2014 commented 4 years ago

Thanks pip uninstall and a fresh install worked