{"id":22384772,"url":"https://github.com/pgarrett-scripps/fastaframes","last_synced_at":"2025-07-31T04:32:41.521Z","repository":{"id":160207461,"uuid":"635131384","full_name":"pgarrett-scripps/FastaFrames","owner":"pgarrett-scripps","description":"Python package to convert between FASTA files and Pandas DataFrames.","archived":false,"fork":false,"pushed_at":"2023-10-04T00:33:27.000Z","size":44,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-08T06:43:34.965Z","etag":null,"topics":["bioinformatics","fasta","mass-spectrometry","package","pandas","protein","protein-sequences","proteomics","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgarrett-scripps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-02T03:12:44.000Z","updated_at":"2024-09-30T21:25:37.000Z","dependencies_parsed_at":"2023-10-04T07:50:43.793Z","dependency_job_id":null,"html_url":"https://github.com/pgarrett-scripps/FastaFrames","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgarrett-scripps%2FFastaFrames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgarrett-scripps%2FFastaFrames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgarrett-scripps%2FFastaFrames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgarrett-scripps%2FFastaFrames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgarrett-scripps","download_url":"https://codeload.github.com/pgarrett-scripps/FastaFrames/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228215612,"owners_count":17886430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","fasta","mass-spectrometry","package","pandas","protein","protein-sequences","proteomics","python"],"created_at":"2024-12-05T01:19:10.097Z","updated_at":"2024-12-05T01:19:11.072Z","avatar_url":"https://github.com/pgarrett-scripps.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![example workflow](https://github.com/pgarrett-scripps/FastaFrames/actions/workflows/python-package.yml/badge.svg)\n![example workflow](https://github.com/pgarrett-scripps/FastaFrames/actions/workflows/pylint.yml/badge.svg)\n\n# FastaFrames\nFastaFrames is a python package to convert between FASTA files and pandas DataFrames.\n\n## Usage\n\nTo install fastaframes use pip:\n\n```sh\npip install fastaframes\n```\n\n### Reading a FASTA file\n```python\nfrom fastaframes import to_df\n\nfasta_df = to_df(data='example.fasta')\n```\n\n### Writing a FASTA file\n```python\nfrom fastaframes import to_fasta\n\nto_fasta(data=fasta_df, output_file='output.fasta')\n```\n\n# Columns:\n- **db**: Database from which the sequence was retrieved. db is 'sp' for UniProtKB/Swiss-Prot and 'tr' for UniProtKB/TrEMBL.\n- **unique_identifier**: The primary accession number of the UniProtKB entry.\n- **entry_name**: The entry name of the UniProtKB entry.\n- **protein_name**: The recommended name of the UniProtKB entry as annotated in the RecName field. For UniProtKB/TrEMBL entries without a RecName field, the SubName field is used. In case of multiple SubNames, the first one is used. The 'precursor' attribute is excluded, 'Fragment' is included with the name if applicable.\n- **organism_name**:  The scientific name of the organism of the UniProtKB entry.\n- **organism_identifier**: The unique identifier of the source organism, assigned by the NCBI.\n- **gene_name**: The first gene name of the UniProtKB entry. If there is no gene name, OrderedLocusName or ORFname, the GN field is not listed.\n- **protein_existence**: The numerical value describing the evidence for the existence of the protein.\n- **sequence_version**: The version number of the sequence.\n- **protein_sequence**: The protein amino acid sequence.\n\n## Example FASTA file:\n\n```\n\u003esp|A0A087X1C5|CP2D7_HUMAN Putative cytochrome P450 2D7 OS=Homo sapiens OX=9606 GN=CYP2D7 PE=5 SV=1\nMGLEALVPLAMIVAIFLLLVDLMHRHQRWAARYPPGPLPLPGLGNLLHVDFQNTPYCFDQ\n```\n\n## Will produce the following:\n\n|   | db | unique_identifier | entry_name   | protein_name                                         | organism_name | organism_identifier | gene_name | protein_existence | sequence_version | protein_sequence                                       |\n|---|----|------------------|--------------|------------------------------------------------------|---------------|---------------------|-----------|-------------------|------------------|--------------------------------------------------------|\n| 0 | sp | A0A087X1C5       | CP2D7_HUMAN  | Putative cytochrome P450 2D7                         | Homo sapiens  | 9606.0              | CYP2D7    | 5.0               | 1.0              | MGLEALVPLAMIVAIFLLLVDLMHRHQRWAARYPPGPLPLPGLGNLLHVDFQNTPYCFDQ |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgarrett-scripps%2Ffastaframes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgarrett-scripps%2Ffastaframes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgarrett-scripps%2Ffastaframes/lists"}