[ENH] Add to_fasta method to janitor.biology - #1701
Open
naseem173 wants to merge 3 commits into
Open
Conversation
Adds a to_fasta convenience method to janitor.biology that writes the identifier and sequence columns of a DataFrame out to a FASTA file (the write counterpart to the existing join_fasta). Closes pyjanitor-devs#646.
Add tests for writing sequence data to FASTA format.
Add changelog entry for the new to_fasta method in janitor.biology.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #1701 +/- ##
==========================================
- Coverage 87.56% 85.94% -1.62%
==========================================
Files 95 125 +30
Lines 6819 9968 +3149
==========================================
+ Hits 5971 8567 +2596
- Misses 848 1401 +553 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Please describe the changes proposed in the pull request:
to_fastaconvenience method tojanitor.biologythat writes the identifier and sequence columns of a DataFrame out to a FASTA file. This is the write-side counterpart to the existingjoin_fasta(which only reads a FASTA file into a DataFrame column).tests/biology/test_to_fasta.py) that writes sequences out withto_fastaand reads them back in to confirm the written FASTA file matches the source data.CHANGELOG.mdentry under[Unreleased].This PR resolves #646.
PR Checklist
Please ensure that you have done the following:
<your_username>:dev, but rather from<your_username>:<feature-branch_name>.CHANGELOG.mdunder the latest version header (i.e. the one that is "on deck") describing the contribution.Automatic checks
There will be automatic checks run on the PR. These include:
Relevant Reviewers
Please tag maintainers to review.