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

Is there a way to go directly from a pd.Dataframe version of a Bed file? #89

Open
haleybianchi opened this issue Oct 26, 2023 · 0 comments

Comments

@haleybianchi
Copy link

Basically the title, I am doing an analysis of various bed file like dataframes, and am wondering if I can convert them into a Frame object for plotting. I have only seen the file I/O operations using BED(), which is currently not working for me. Regardless, converting a pd.Df to a frame object would be usefule.

----> 9 BED(f"{BED_DIR}v_genes.bed") + Title("mouse IghV") +
10 BigWig(f"{BW_DIR}B6_K27ac.bw") + Title("Pro-b K27ac") +
11 prob + Title("Pro-b HiC")
13 frame.plot(TEST_RANGE)

File /data/bianchiah/mymamba/envs/mambamatrix2/lib/python3.8/site-packages/coolbox/core/track/bed/bed.py:36, in BED.init(self, file, **kwargs)
31 properties.update({
32 'file': file,
33 **kwargs
34 })
35 super().init(**properties)
---> 36 self.bgz_file = build_bed_index(file)

File /data/bianchiah/mymamba/envs/mambamatrix2/lib/python3.8/site-packages/coolbox/utilities/bed.py:406, in build_bed_index(file)
404 bgz_file = file + '.bgz'
405 log.info(f"Bgzip bed file, save to {bgz_file}")
--> 406 bgz_bed(file, bgz_file)
...
363 cmd = popenargs[0]
--> 364 raise CalledProcessError(retcode, cmd)
365 return 0

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

No branches or pull requests

1 participant