Last active
April 26, 2016 12:06
-
-
Save IgorFobia/6078848 to your computer and use it in GitHub Desktop.
Concatenate the sequences of a multi-FASTA file and make a new FASTA file with the new sequence
This file contains 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
#!/bin/bash | |
# Concatenate the sequences of a multi-FASTA file and make a new FASTA file with the new sequence | |
INPUT_FILE=$1 | |
OUTPUT_FILE=$2 | |
(echo ">concantenated"; grep -i '^[ACGTURYKMSWBDHVNX\-]*$' $INPUT_FILE | tr -d '\n' | fold -w 60; echo) > $OUTPUT_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!