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

Add NamedFeature for common interface to name in bed or interval_list #1680

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

rickymagner
Copy link
Contributor

Description

This short PR adds an IntervalFileFeature interface which extends the Feature interface to include a getName method common to both lines in bed files and interval_list files. This allows you to be able to parse and work with bed and interval_list file lines uniformly when you need to access metadata in the name field. This will be used in an upcoming change in GATK.

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

@rickymagner I think this is a good idea but I don't think the name is right. Maybe NamedFeature would make more sense?

* An interface for features provided via an interval file, e.g. bed or interval_list.
* Provides a common interface for accessing the name column for both of these file types.
*/
public interface IntervalFileFeature extends Feature {
Copy link
Member

Choose a reason for hiding this comment

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

I might call this "NamedFeature"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I just updated the name to the more descriptive NamedFeature.

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

👍

@lbergelson lbergelson merged commit 38dbd0e into samtools:master Aug 9, 2023
4 checks passed
@lbergelson
Copy link
Member

Ack, I merged without fixing the commit name... .bleh.

@rickymagner rickymagner changed the title Add IntervalFileFeature for common interface to name in bed or interval_list Add NamedFeature for common interface to name in bed or interval_list Nov 14, 2023
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.

2 participants