Skip to content

julianovmartins/multifasta-to-fasta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

multifasta-to-fasta

Multi-FASTA to individual FASTA files

This script is designed to process files in multi-FASTA format, extracting individual FASTA content blocks.

Usage: Place this script in the root directory containing your FASTA files and execute it from the command line.

Functionality:

  • Line 2: Searches recursively for FASTA files in all directory trees.
  • Line 4: Counts the number of sequence headers in each FASTA file.
  • Line 5: Process files if they contain more than one sequence (multi-FASTA).
  • Line 6-8: Sets up file and directory names for processing.
  • Line 9-11: Creates a new directory for each multi-FASTA file if it doesn't exist.
  • Line 12: Extracts each sequence from the multi-FASTA file, saving it as an individual FASTA file in the newly created directory.
  • Line 13: Outputs the completion status with the path of the processed file.

To give execute permission:

chmod +x multifasta_to_fasta.sh

Run:

./multifasta_to_fasta.sh

About

Multi-fasta to fasta file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages