Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

supported to run ROSE2 in python3 environment#67

Open
gauravj49 wants to merge 3 commits into
BradnerLab:masterfrom
gauravj49:master
Open

supported to run ROSE2 in python3 environment#67
gauravj49 wants to merge 3 commits into
BradnerLab:masterfrom
gauravj49:master

Conversation

@gauravj49

Copy link
Copy Markdown

No description provided.

@jdimatteo jdimatteo left a comment

Copy link
Copy Markdown
Member

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.

Comment thread ROSE2_geneMapper.py
import os
import subprocess
from string import join
# from string import join

Copy link
Copy Markdown
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.

Comment thread utils.py
pass

from string import join, maketrans
# from string import join, maketrans

Copy link
Copy Markdown
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

Comment thread ROSE2_geneMapper.py

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

Copy link
Copy Markdown
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?

Comment thread ROSE2_geneMapper.py
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
Copy Markdown
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

Comment thread utils.py
marker = idfun(item)
# in old Python versions:
# if seen.has_key(marker)
# if marker in seen

Copy link
Copy Markdown
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

vsoch commented Mar 18, 2020

Copy link
Copy Markdown
Contributor

@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

charlesylin commented Mar 18, 2020 via email

Copy link
Copy Markdown
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants