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 jbrowse sort-gff subcommand #4032

Merged
merged 2 commits into from
Nov 3, 2023
Merged

Add jbrowse sort-gff subcommand #4032

merged 2 commits into from
Nov 3, 2023

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Nov 2, 2023

This helps automate the sorting of a gff, which can require tedious typing

This could be used in the Current Protocols paper also as a way to reduce steps

Assumes a unix-y type system with sh, sort, grep

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Nov 2, 2023
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 2, 2023

Usage

jbrowse sort-gff file.gff | bgzip > out.sorted.gff.gz
tabix out.sorted.gff.gz

@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Nov 2, 2023
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #4032 (e37048e) into main (4fe46f8) will increase coverage by 0.02%.
Report is 1 commits behind head on main.
The diff coverage is 33.33%.

❗ Current head e37048e differs from pull request most recent head 7924c6d. Consider uploading reports for the commit 7924c6d to get more accurate results

@@            Coverage Diff             @@
##             main    #4032      +/-   ##
==========================================
+ Coverage   63.68%   63.70%   +0.02%     
==========================================
  Files        1026     1027       +1     
  Lines       30251    30260       +9     
  Branches     7199     7201       +2     
==========================================
+ Hits        19264    19276      +12     
+ Misses      10822    10817       -5     
- Partials      165      167       +2     
Files Coverage Δ
products/jbrowse-cli/src/commands/sort-gff.ts 33.33% <33.33%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 2, 2023

any thoughts on adding this to CLI @garrettjstevens ?

Copy link
Collaborator

@garrettjstevens garrettjstevens left a comment

Choose a reason for hiding this comment

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

Yeah, looks good to me. sort does exist on Windows, but since grep does not, it should properly error out there. Also I think these commands should work on BSD sort/grep as well as GNU.

It could be worth a note in the description that this will not preserve the locations of comments or ### sync directives, although that's the same probably no matter how you sort it.

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 2, 2023

excellent, updated description. It actually now checks for 'sh' too because it uses 'sh' to launch the subshell syntax that is being used

@cmdcolin cmdcolin merged commit 82d55ff into main Nov 3, 2023
1 check passed
@cmdcolin cmdcolin deleted the sort_gff branch November 3, 2023 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants