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

Extra ; in barcode_report.tsv #197

Closed
ktpolanski opened this issue Jun 9, 2023 · 2 comments
Closed

Extra ; in barcode_report.tsv #197

ktpolanski opened this issue Jun 9, 2023 · 2 comments

Comments

@ktpolanski
Copy link

Hello, I've fed another new type of data through TRUST4 to reconstruct contigs from it. While doing so, I encountered an error when trying to run barcoderep-expand.py (technically my modification of it, but the issue still holds when doing --chain 2 with the original code from the repository). Inspecting the file reveals the following problem line, formatted as a minimal working example.

#barcode	cell_type	chain1	chain2	secondary_chain1	secondary_chain2
AGCGTCCTTGAAAG	B	*	IGKV1-39*01,*,IGKJ4*01,IGKC,TGTCAACAGAGTTACACTATCCCTCTCACTTTC,CQQSYTIPLTF,12.00,AGCGTCCTTGAAAG_336,93.75,0	*	IGLV2-14*01,*,IGLJ1*01,IGLC1,TGCAGCTCATATACAAGCAGCAGCACTCTCGGTGTCTTC,CSSYTSSSTLGVF,8.00,AGCGTCCTTGAAAG_71120,100.00,0;

Trying to feed this into the barcode expansion script treats the ; at the end as a delimiter indicating another secondary chain, and then fails at processing it as there's nothing there to process:

$ python3 /mnt/TRUST4/scripts/barcoderep-expand.py -b test.tsv --chain 2 > test_chain2.tsv
Traceback (most recent call last):
  File "/mnt/TRUST4/scripts/barcoderep-expand.py", line 86, in <module>
    abund = float(subCols[6])
IndexError: list index out of range

I haven't seen this before, do you have any idea what would cause the extra ; to appear here? Dealing with it has the file process without issue.

@mourisl
Copy link
Collaborator

mourisl commented Jun 9, 2023

Thank you for identifying the bug. I have uploaded a new trust-barcoderep.pl script to the github repo. Could you please pull the new version and rerun TRUST4 with the additional command --stage 3 (only regenerating the report files based on previous intermediate files if you want to save some time)? Thank you.

@ktpolanski
Copy link
Author

Yep, ran like a charm now! Thanks a lot!

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

2 participants