Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issues with PhyloGenes on macOS #8

Open
samandmac opened this issue Nov 22, 2022 · 2 comments
Open

Possible issues with PhyloGenes on macOS #8

samandmac opened this issue Nov 22, 2022 · 2 comments

Comments

@samandmac
Copy link
Owner

samandmac commented Nov 22, 2022

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.

@samandmac
Copy link
Owner Author

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.

@samandmac
Copy link
Owner Author

Based on conversations with Mac User's the patch1 wasnt working - for now continue with the workaround above until I fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant