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

new method rename-chr #389

Merged

Conversation

kevinrue
Copy link
Contributor

@kevinrue kevinrue commented Apr 5, 2018

I needed to bring some BED files from mm10 to GRCm38 chromosomes.

@kevinrue
Copy link
Contributor Author

kevinrue commented Apr 5, 2018

Oops: I accidentally submitted the PR with a Shift+Return keyboard shortcut before I finished writing my comment. So here is the rest:
This PR implements a new method that takes a two-column TAB delimited file that maps source chromosome names to target names. See https://github.com/dpryan79/ChromosomeMappings for examples.
This avoids issues where a simple trimming of 'chr' does not work (e.g. chrM -> MT)
I couldn't find a utility to do this anywhere else.
I hope that's useful. Let me know if this is relevant for a PR, and if more documentation is required.

@sebastian-luna-valero
Copy link
Member

Many thanks @kevinrue

Would it be possible to add a test for this new method?
https://github.com/CGATOxford/cgat/tree/master/tests/bed2bed.py

Please let me know if you need help with the testing.

@kevinrue
Copy link
Contributor Author

kevinrue commented Apr 5, 2018

I've actually started doing the same for gff2gff, as I'm facing the same issue with other input files.
I can look at tests for both of them simultaneously when I'm done with the second one. I'll give you a shout if I struggle.
Best,
Kevin

@sebastian-luna-valero
Copy link
Member

Great, many thanks!

@sebastian-luna-valero sebastian-luna-valero merged commit 4165d66 into CGATOxford:master Apr 5, 2018
sebastian-luna-valero added a commit to cgat-developers/cgat-apps that referenced this pull request May 29, 2018
sebastian-luna-valero added a commit to cgat-developers/cgat-apps that referenced this pull request May 29, 2018
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