Inferring a phylogenetic tree from BLASTn I am trying to infer a phylogenetic tree from a Blastn output and from what I have understood, what I should do is 1) extract the alignments and re-align them using Muscle, then 2) feed the .aln file into PhyML. 
Is this correct? 

Or should I be extracting the hsps from each alignment as suggested here https://biopython.org/wiki/Phylo? I don't quite understand why the hsps are extracted here, shouldn't the whole sequences be compared in the multiple alignment?
If you look into the get_seqrecs() function, you will see that this function is not extracting hsps to use in the following steps but the hsps are used in order to filter out low score BLAST alignments. The function accepts a blast alignment result and a threshold, and if the hsp score is above the supplied threshold the whole sequence (not just the hsp) would be the output. Your intuition is correct, the whole sequence should go in the MSA step.