Skip to content

jbolanos93/Format_Fasta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Format_Fasta

Python Script that will format length of nucleotide bases in fasta file.

Requirements

  • python 3.0 or greater

Description:

This script will format nucleotide bases to be the same length of string.

Example:

>Seq1
ATGGG
GGGGG
ATTGT
>Seq2
ATGAGAGAGAAG
ATGAGAGAGAAG
ATGAGAGAGAAG

output will be:

>Seq1
ATGGGGGG
GGGGGGGG
ATTGTGAA
>Seq2
ATGAGAGA
GAAGATGA
GAGAGAAG
ATGAGAGA
GAAG

New file will be written in the same directory as the provided fasta.

note: Package downloads a sample fasta to test code with.

How to use:

Run as follows:

python Format_Fasta.py <Path to Fasta> <Length of Sequence>

Path to Fasta: is the path to the fasta file you want to format. (extension of the file should be .fa .fasta .FASTA)

Length of Sequence: is an integer determining how many bases to have per squence.

Example:

python Format_Fasta.py /Users/Foo/Desktop/Fasta_file.fasta 35

About

Python Script that will format length of nucleotide bases in fasta file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages