wdecoster / NanoPlot

Plotting scripts for long read sequencing data
http://nanoplot.bioinf.be
MIT License
429 stars 47 forks source link

TypeError: unsupported operand type(s) for -: 'str' and 'str' #96

Closed dslater82 closed 6 years ago

dslater82 commented 6 years ago

When running NanoPlot -f pdf --sumary, I receive the following error message message from the log file. I have tried reinstalling pandas, using different version of pandas to no avail. Any ideas?

2018-09-20 13:34:57,132 NanoPlot 1.0.0 started with arguments Namespace(alength=False, bam=None, barcoded=False, color='#4CB391', downsample=None, drop_outliers=False, fastq=None, fastq_minimal=None, fastq_rich=None, format='pdf', listcolors=False, loglength=False, maxlength=None, minqual=None, no_N50=False, outdir='results', pickle=None, plots=['kde', 'hex', 'dot'], prefix='', readtype='1D', report=False, store=False, summary=['sequencing_summary.txt'], threads=4, verbose=False) 2018-09-20 13:34:57,133 Python version is: 3.6.1 (default, Apr 7 2017, 08:24:19) [GCC 4.9.4] 2018-09-20 13:34:57,134 Nanoplotter: valid output format pdf 2018-09-20 13:34:57,311 Nanoget: Collecting metrics from summary file sequencing_summary.txt for 1D sequencing 2018-09-20 13:35:01,431 Nanoget: Finished collecting statistics from summary file sequencing_summary.txt 2018-09-20 13:35:02,845 Reduced DataFrame memory usage from 398.6543779373169Mb to 324.6600179672241Mb 2018-09-20 13:35:05,290 unsupported operand type(s) for -: 'str' and 'str' Traceback (most recent call last): File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/ops.py", line 1012, in na_op result = expressions.evaluate(op, str_rep, x, y, eval_kwargs) File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/computation/expressions.py", line 205, in evaluate return _evaluate(op, op_str, a, b, eval_kwargs) File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/computation/expressions.py", line 65, in _evaluate_standard return op(a, b) TypeError: unsupported operand type(s) for -: 'str' and 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/ops.py", line 1033, in safe_na_op return na_op(lvalues, rvalues) File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/ops.py", line 1023, in na_op result[mask] = op(x[mask], y) TypeError: unsupported operand type(s) for -: 'str' and 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/apps/software/NanoPlot/1.0.0-IGB-gcc-4.9.4-Python-3.6.1/lib/python3.6/site-packages/NanoPlot-1.0.0-py3.6.egg/nanoplot/NanoPlot.py", line 56, in main barcoded=args.barcoded) File "/home/apps/software/NanoPlot/1.0.0-IGB-gcc-4.9.4-Python-3.6.1/lib/python3.6/site-packages/nanoget-1.7.4-py3.6.egg/nanoget/nanoget.py", line 79, in get_input datadf = calculate_start_time(datadf) File "/home/apps/software/NanoPlot/1.0.0-IGB-gcc-4.9.4-Python-3.6.1/lib/python3.6/site-packages/nanoget-1.7.4-py3.6.egg/nanoget/nanoget.py", line 129, in calculate_start_time df["start_time"] = df["time_arr"] - df["time_arr"].min() File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/ops.py", line 1069, in wrapper result = safe_na_op(lvalues, rvalues) File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/ops.py", line 1037, in safe_na_op lambda x: op(x, rvalues)) File "pandas/_libs/algos_common_helper.pxi", line 1212, in pandas._libs.algos.arrmap_object File "/home/apps/software/Python/3.6.1-IGB-gcc-4.9.4/lib/python3.6/site-packages/pandas/core/ops.py", line 1037, in lambda x: op(x, rvalues)) TypeError: unsupported operand type(s) for -: 'str' and 'str'

wdecoster commented 6 years ago

Thanks for reporting this. I see you are using NanoPlot 1.0.0, could you try updating? If you use pip for installation:

pip install NanoPlot -U

If that doesn't work, can you perhaps share the summary file which causes this?

dslater82 commented 6 years ago

You can close this as we had some corruption in our summary file. Once we have that sorted out, we will be tring agian. I did try the nanopolot 1.18 from pip and the 1.0.0 release from the github page.

On 09/20/2018 02:08 PM, Wouter De Coster wrote:

Thanks for reporting this. I see you are using NanoPlot 1.0.0, could you try updating? If you use pip for installation:

|pip install NanoPlot -U|

If that doesn't work, can you perhaps share the summary file which causes this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wdecoster/NanoPlot/issues/96#issuecomment-423298410, or mute the thread https://github.com/notifications/unsubscribe-auth/AGqBicmN04_S17VJu_Dak6lNM9Jr2-jsks5uc-ekgaJpZM4Wysk6.Web Bug from https://github.com/notifications/beacon/AGqBibN2rGgE_OUU1bkAy7Ev0zBVd_Ogks5uc-ekgaJpZM4Wysk6.gif

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/wdecoster/NanoPlot","title":"wdecoster/NanoPlot","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/wdecoster/NanoPlot"}},"updates":{"snippets":[{"icon":"PERSON","message":"@wdecoster in #96: Thanks for reporting this. I see you are using NanoPlot 1.0.0, could you try updating? \r\nIf you use pip for installation:\r\n\r\npip install NanoPlot -U\r\n\r\nIf that doesn't work, can you perhaps share the summary file which causes this?"}],"action":{"name":"View Issue","url":"https://github.com/wdecoster/NanoPlot/issues/96#issuecomment-423298410"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/wdecoster/NanoPlot/issues/96#issuecomment-423298410", "url": "https://github.com/wdecoster/NanoPlot/issues/96#issuecomment-423298410", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [wdecoster/NanoPlot] TypeError: unsupported operand type(s) for -: 'str' and 'str' (#96)", "sections": [ { "text": "", "activityTitle": "Wouter De Coster", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@wdecoster", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"wdecoster/NanoPlot\",\n\"issueId\": 96,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"wdecoster/NanoPlot\",\n\"issueId\": 96\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/wdecoster/NanoPlot/issues/96#issuecomment-423298410" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 382388538\n}" } ], "themeColor": "26292E" } ]

wdecoster commented 6 years ago

That could explain it, please let me know if the error is not solved.