#First, run MAFFT on the files; #Do this with a loop to make it run faster. #cd into the directory where the individual files are (MAFFT in mine) and then run the command: for FILENAME in *.fasta do mafft --auto --reorder "$FILENAME" > "$FILENAME.mafft" done ls #now we have alignmnents. So now we are going to trim out the less informative sites. Using Trimal. #We will manually decide our thresholds. We will try it on default. That will trim any sites that has less than 10% occupancy(completeness) #This loop should trim all #NOTE:make sure that you do not have any spaces in the header names of your input files or they will be cut and you will be punished. for FILENAME in *fasta.mafft do /Users/erin/Desktop/Phylogenetic_Tree_programs/trimal/source/trimal -noallgaps -in $FILENAME -out $FILENAME.trimal.fas done for FILENAME in *fasta.mafft do /Users/jessica/Phylogenetic_Trees/trimAl/source/trimal -noallgaps -in $FILENAME -out $FILENAME.trimal.fas done /Users/jessica/Phylogenetic_Trees/trimAl/source /Users/jessica/Phylogenetic_Trees/trimal-trimAl/source/trimal #Make sure when running trimal the output file is in .fas also the commmand -noallgaps is also very useful to use for trees. #above we set the path to trimal because it was not in the working directory. It can be added if we want, however the path works fine too. #Next we want to run Fasconcat to make a concatenated data matrix of all of our files. Trimal needs to be ran first so that they are all the same length. perl FASconCAT_v1.11.pl #have to use perl for this on the labtop. #Move all .trimal.out files to a new directory. FASconCat will want to run on all files in directory, so these need to be seperate out #/Users/erin/Desktop/MAFFT/FASconCat is where i moved the files too. perl /Users/erin/Desktop/Phylogenetic_Tree_programs/FASconCAT/FASconCAT_v1.11.pl -l -p -p -s -n-n Perl /Users/jessica/Phylogenetic_Trees/FASconCAT-master/FASconCAT_v1.11.pl -l -p -p -s #This worked and now we want the FcC_smatrix.fas file from FASconCAT run to make a tree! To run in Iqtree #IqTree has near infinite numbers of different models. We want to pick the best model for our data #If we dont know what one to use, it will tell us which one or our data (GO IQ TREE) pwd to the iqtree2 bin /Users/jessica/Phylogenetic_Trees/iqtree-2.1.3-MacOSX/bin/iqtree2 -s *.phy -bb 1000 /Users/erin/Desktop/Phylogenetic_Tree_programs/iqtree-2.1.2-MacOSX/bin/iqtree2 -s *.phy -m MFP -bb 1000 #MFP-Model finding program (it looks at the data and asks what subsitution model will best fit the data) #-bb 1000; Runs 1000 rapid bootstraps # THis opens the data, look at every single site and decide what the best model is for every site, and then picks one for the whole matrix. #Takes the model and uses it to build a tree and performs 1000 rapid bootstraps to give us our boostrap values. -m MFP is a default so we dont have to give it that flag /Users/erin/Desktop/Phylogenetic_Tree_programs/iqtree-2.1.2-MacOSX/bin/iqtree2 -s *.phy -bb 1000 #we look through results but we wanted to try another model to see if it gives us the best model. /Users/erin/Desktop/Phylogenetics/iqtree-2.0.6-Linux/bin/iqtree -s *.phy -m TEST -bb 1000 /Users/jessica/Phylogenetic_Trees/iqtree-1.6.12-MacOSX/bin/iqtree -s *.phy -m MF #this goes through and will decide what the best model is and then run that model to make a tree. (GO IQTREE) #We are using a fixed model. thats using one model for every single site on the matrix. #It can also used mixed models; iqtree -s *.phy -m GTR+I+G -bb 1000 /Users/jessica/Phylogenetic_Trees/iqtree-1.6.12-MacOSX/bin/iqtree -s *.phy -m Test -bb 1000 iqtree -s *.phy -m MF