-
Notifications
You must be signed in to change notification settings - Fork 27
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
Subprocesses path for bigwig and bigbed outputs #125
Conversation
bioframe/io/fileops.py
Outdated
@@ -488,7 +491,7 @@ def read_bigbed(path, chrom, start=None, end=None, engine="auto"): | |||
return df | |||
|
|||
|
|||
def to_bigwig(df, chromsizes, outpath, value_field=None): | |||
def to_bigwig(df, chromsizes, outpath, value_field=None, path=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path_to_binary would be more explicit
bioframe/io/fileops.py
Outdated
cmd = os.path.join(path, "bedGraphToBigWig") | ||
if not os.path.isfile(cmd) and os.access(cmd, os.X_OK): | ||
raise ValueError( | ||
f"bedGraphToBigWig is absent in the provided path: {path}. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absent or cannot be exectuted
bioframe/io/fileops.py
Outdated
with tempfile.NamedTemporaryFile(suffix=".bg") as f, tempfile.NamedTemporaryFile( | ||
"wt", suffix=".chrom.sizes" | ||
) as cs: | ||
with open(outpath+'.bg', 'w') as f, open(outpath+'.cs', 'w') as cs: #tempfile.NamedTemporaryFile(suffix=".bg") as f, tempfile.NamedTemporaryFile( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert?
bioframe/io/fileops.py
Outdated
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
) | ||
return p | ||
|
||
|
||
def to_bigbed(df, chromsizes, outpath, schema="bed6"): | ||
def to_bigbed(df, chromsizes, outpath, schema="bed6", path=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment about argument name
Option to change bedgraphToBigwig path #124