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

pileup: bed vs. bedpe inference #427

Open
gfudenberg opened this issue Mar 30, 2023 · 2 comments
Open

pileup: bed vs. bedpe inference #427

gfudenberg opened this issue Mar 30, 2023 · 2 comments

Comments

@gfudenberg
Copy link
Member

if a bedpe type file is provided, but columns are ['chrom', ' start', 'end', 'chrom1', 'start1', 'end1', 'chrom2', 'start2', 'end2'], pileup() silently defaults to on-diagonal pileup type, because the ['chrom', 'start', 'end'] are autodetected first.

potential solution:

  • replace autodetection with a feature_type argument that specifies whether pileup should consider input dataframe as a bed or bedpe

cc @Phlya

@gfudenberg
Copy link
Member Author

CLI seems to be a bit pickier about how features are provided!

https://github.com/open2c/cooltools/blob/6a7d1158c59457c63c8a032444f772fcd22766d1/cooltools/cli/pileup.py#LL178C1-L181C10

raise NotImplementedError(
            "Automatic detection of features format is not implemented yet. "
            "Please provide BED or BEDPE as --features-format"
        )

@nvictus
Copy link
Member

nvictus commented Jun 19, 2023

We could also add a cols argument to customize the column names. Depending on feature_type, this would expect a length-3 or length-6 list of names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants