You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've encountered two problems with users who use macOS:
SED error when running PhyloGenes
The "if" condition in the loop for some reason isn't working, even though that comparison should
To bypass these issues I recommend these solutions, respectively:
Download gnu-sed brew install gnu-sed and replace all the "sed" in PhyloGenes.sh with "gsed".
Comment out lines 189 - 196 in PhyloGenes.sh - this ignores deletion of files in the PhyloGenes folder. From here, run each part of the if condition manually:
blastn -query /Users/you/Documents/PhyloTree-main/PhyloGenes/GeneListX.txt -subject /Users/you/Documents/PhyloTree-main/Tree_Genomes/$W.fasta -qcov_hsp_perc 80 -perc_identity 70 -outfmt "6 qseqid pident" | gsed 's/^\(.\{0\}\)/\1>/' | awk '!seen[$0]++' | sort -k 2n > Z_Last_File.txt #X in GeneListX.txt should be the number of genomes. E.g. if you have 88 strains, you should use GeneList88.txt
head Z_Last_File.txt | awk '{print $1}' > Z_Ortho_Names.txt
grep -Fwf Z_Ortho_Names.txt singleLineGenes.txt | gsed 's/[[:blank:]]*\([^[:blank:]]*\)$/\n\1/' > Z_Orthologs.txt
gsed '/^>/ s/^.*gene=\([Aa-Zz]\+\).*/\1/' Z_Orthologs.txt | gsed '1~2s/^/>/' > /Users/you/Documents/PhyloTree-main/Tree_Genes/geneList.txt
Remember to swap your path with the path used in the above example.
I'd appreciate any input from Mac user's as to why the comparison in the IF statement in PhyloGenes.sh isn't working, and workarounds for the SED, given that SED differs between Linux and Mac.
The text was updated successfully, but these errors were encountered:
I've updated the code of PhyloGenes in patch-1 to bypass the issue of it ignoring the check in the loop. I'm currently trying to see if this works on a Mac now - if it does the problem is solved.
So I've encountered two problems with users who use macOS:
To bypass these issues I recommend these solutions, respectively:
brew install gnu-sed
and replace all the "sed" in PhyloGenes.sh with "gsed".Remember to swap your path with the path used in the above example.
I'd appreciate any input from Mac user's as to why the comparison in the IF statement in PhyloGenes.sh isn't working, and workarounds for the SED, given that SED differs between Linux and Mac.
The text was updated successfully, but these errors were encountered: