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

invalid literal for int() with base 10 error #21

Open
kaanokay opened this issue Mar 6, 2021 · 3 comments
Open

invalid literal for int() with base 10 error #21

kaanokay opened this issue Mar 6, 2021 · 3 comments
Labels

Comments

@kaanokay
Copy link

kaanokay commented Mar 6, 2021

Hi,

First of all, thank you for this script-based IGV visualization.

When I run your demo dataset and also mine, I obtained error that I attached it as screenshot below:

Screenshot from 2021-03-06 15-02-06

Can I solve this issue?

Thanks for your interest.

Best wishes.

@stevekm
Copy link
Owner

stevekm commented Jul 9, 2021

You might try commenting out these two lines;

x_serv_port = get_open_X_server()
print('\nOpen Xvfb port found on:\n{}\n'.format(x_serv_port))

I had previously been using this method to obtain an open xvfb server number;

def get_open_X_server():
'''
Search for an open Xvfb port to render into
'''
x_serv_command= '''
for serv_num in $(seq 1 1000); do
if ! (xdpyinfo -display :${serv_num})&>/dev/null; then
echo "$serv_num" && break
fi
done
'''
import subprocess as sp
# run the command, capture the output
process = sp.Popen(x_serv_command,stdout=sp.PIPE, shell=True)
x_serv_port = int(process.communicate()[0].strip())
return(x_serv_port)

However I later found that many systems include xvfb-run --auto-servernum method which I switched over to using here;

igv_command = "xvfb-run --auto-servernum --server-num=1 java -Xmx{}m -jar {} -b {}".format(memMB, igv_jar, igv_script)

however the original call to xdpyinfo is still present and it appears that the version on your system is giving a different response than expected.

If commenting out that works for you I can make a fix in the script for it as well. Thanks.

@stevekm
Copy link
Owner

stevekm commented Jul 9, 2021

this whole process is a little tricky since it seems like different systems have slightly different versions of xdpyinfo and xvfb-run which can cause problems like this.

@stevekm stevekm added the bug label Sep 9, 2021
@stevekm
Copy link
Owner

stevekm commented Sep 9, 2021

marking this as a bug that I should probably fix; just get rid of the old command that is not needed anymore

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

2 participants