Last active
December 19, 2015 08:39
-
-
Save carlosp420/5927809 to your computer and use it in GitHub Desktop.
for processing Mariannas files.
Input should be a csv file
This file contains hidden or 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
# convert marianna's files into bash commmand | |
sed 's/\(^[0-9]\+\),\(.\+\),.\+\*\(.\+\)/\3\*\1-\2/g' < Genus.csv > Genus.sh | |
# first part | |
sed "s/^/sed -i 's\//g" < Genus.sh | |
# half | |
sed "s/*/\//g" < Genu.sh | |
# last | |
sed "s/$/\/g' *fas \&\& /g" < Genus.sh | |
# split lines that were accidentally joined | |
sed 's/,\([0-9]\{4\},\)/\n\1/g' | |
# add end of line | |
sed -i -e '$a\' file | |
# in Vim, add line numbers to text | |
:%s/$/\=line('.')/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment