Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastaframes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastaframes

A very simple fasta file parser.

  • 1.1.0
  • PyPI
  • Socket score

Maintainers
1

example workflow example workflow

FastaFrames

FastaFrames is a python package to convert between FASTA files and pandas DataFrames.

Usage

To install fastaframes use pip:

pip install fastaframes

Reading a FASTA file

from fastaframes import to_df

fasta_df = to_df(data='example.fasta')

Writing a FASTA file

from fastaframes import to_fasta

to_fasta(data=fasta_df, output_file='output.fasta')

Columns:

  • db: Database from which the sequence was retrieved. db is 'sp' for UniProtKB/Swiss-Prot and 'tr' for UniProtKB/TrEMBL.
  • unique_identifier: The primary accession number of the UniProtKB entry.
  • entry_name: The entry name of the UniProtKB entry.
  • 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.
  • organism_name: The scientific name of the organism of the UniProtKB entry.
  • organism_identifier: The unique identifier of the source organism, assigned by the NCBI.
  • 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.
  • protein_existence: The numerical value describing the evidence for the existence of the protein.
  • sequence_version: The version number of the sequence.
  • protein_sequence: The protein amino acid sequence.

Example FASTA file:

>sp|A0A087X1C5|CP2D7_HUMAN Putative cytochrome P450 2D7 OS=Homo sapiens OX=9606 GN=CYP2D7 PE=5 SV=1
MGLEALVPLAMIVAIFLLLVDLMHRHQRWAARYPPGPLPLPGLGNLLHVDFQNTPYCFDQ

Will produce the following:

dbunique_identifierentry_nameprotein_nameorganism_nameorganism_identifiergene_nameprotein_existencesequence_versionprotein_sequence
0spA0A087X1C5CP2D7_HUMANPutative cytochrome P450 2D7Homo sapiens9606.0CYP2D75.01.0MGLEALVPLAMIVAIFLLLVDLMHRHQRWAARYPPGPLPLPGLGNLLHVDFQNTPYCFDQ

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc