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

supported to run ROSE2 in python3 environment #67

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gauravj49
Copy link

No description provided.

Copy link
Member

@jdimatteo jdimatteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes look good to me -- thank you for taking the time to update this code to python3.

Are there any tests for ROSE2 that were run to ensure this doesn't break things or have significant negative effects on performance?

I'm very sorry that this wasn't reviewed sooner. Also, I'm not very familiar with the ROSE2 code. If you are interested in becoming a contributor on this repository to help maintenance of ROSE2, please let me know.

@@ -40,7 +40,7 @@

import os
import subprocess
from string import join
# from string import join
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete code instead of commenting it out.

@@ -53,7 +53,7 @@
except ImportError:
pass

from string import join, maketrans
# from string import join, maketrans
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please delete code instead of commenting it out


# get the ID and convert to name
closestGene = startDict[allEnhancerGenes[distList.index(min(distList))]]['name']
except:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want this to fail silently? Or give some meaningful message to the user? Or catch a specific kind of error that you expect?

idxStats= idxStats.communicate()
bamChromList = [line.split('\t')[0] for line in idxStats[0].split('\n')[0:-2]]
idxStats = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True,
universal_newlines=True).communicate()[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally it's not good practice to use shell=True, but probably for a small scientific pipeline this would be okay. Here is an example of not using shell=True: https://github.com/HPC-buildtest/buildtest-framework/blob/devel/buildtest/utils/command.py#L55

@@ -1261,7 +1261,7 @@ def idfun(x): return x
for item in seq:
marker = idfun(item)
# in old Python versions:
# if seen.has_key(marker)
# if marker in seen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary to keep since it's commented out?

@vsoch
Copy link
Contributor

vsoch commented Mar 18, 2020

@gauravj49 I suspect you'll need to rebase with master so that the fixes to the testing are present (and we can test your changes as well!)

@charlesylin
Copy link
Member

charlesylin commented Mar 18, 2020 via email

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

Successfully merging this pull request may close these issues.

4 participants