zx0223winner / TreeTuner

A pipeline for minimizing redundancy and complexity in large phylogenetic datasets
GNU General Public License v3.0
5 stars 1 forks source link

Loading Errow #2

Open BryanAbuchery opened 2 weeks ago

BryanAbuchery commented 2 weeks ago

Please help as I am stuck in trying to run TreeTuner on Mac. Here are the steps of what I have done:

(base) bryanabuchery@Abuchery ~ % brew install ruby.3.1.6 Warning: No available formula with the name "ruby.3.1.6". Did you mean ruby@3.1? ==> Searching for similarly named formulae and casks... ==> Formulae ruby@3.1

To install ruby@3.1, run: brew install ruby@3.1 (base) bryanabuchery@Abuchery ~ % brew install ruby@3.1 ==> Downloading https://ghcr.io/v2/homebrew/core/ruby/3.1/manifests/3.1.6 ####################################################################################################################################################### 100.0% ==> Fetching ruby@3.1 ==> Downloading https://ghcr.io/v2/homebrew/core/ruby/3.1/blobs/sha256:7c5a047c339ba80d2a14b34ef244ed9e0af7102d340b8e5f91eca4d7a0a853bf ####################################################################################################################################################### 100.0% ==> Pouring ruby@3.1--3.1.6.arm64_sonoma.bottle.tar.gz ==> Caveats By default, binaries installed by gem will be placed into: /opt/homebrew/lib/ruby/gems/3.1.0/bin

You may want to add this to your PATH.

ruby@3.1 is keg-only, which means it was not symlinked into /opt/homebrew, because this is an alternate version of another formula.

If you need to have ruby@3.1 first in your PATH, run: echo 'export PATH="/opt/homebrew/opt/ruby@3.1/bin:$PATH"' >> ~/.zshrc

For compilers to find ruby@3.1 you may need to set: export LDFLAGS="-L/opt/homebrew/opt/ruby@3.1/lib" export CPPFLAGS="-I/opt/homebrew/opt/ruby@3.1/include"

For pkg-config to find ruby@3.1 you may need to set: export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby@3.1/lib/pkgconfig" ==> Summary 🍺 /opt/homebrew/Cellar/ruby@3.1/3.1.6: 16,253 files, 45.2MB ==> Running brew cleanup ruby@3.1... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew). (base) bryanabuchery@Abuchery ~ % echo 'export PATH="/opt/homebrew/opt/ruby@3.1/bin:$PATH"' >> ~/.zshrc (base) bryanabuchery@Abuchery ~ % ruby treetrimmer.rb ruby: No such file or directory -- treetrimmer.rb (LoadError) (base) bryanabuchery@Abuchery ~ % brew install BioRuby
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

Warning: No available formula with the name "bioruby". ==> Searching for similarly named formulae and casks... Error: No formulae or casks found for bioruby. (base) bryanabuchery@Abuchery ~ % gem install bio Fetching bio-2.0.5.gem ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. (base) bryanabuchery@Abuchery ~ % ruby -v ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23] (base) bryanabuchery@Abuchery ~ % source ~/.zshrc (base) bryanabuchery@Abuchery ~ % ruby -v
ruby 3.1.6p260 (2024-05-29 revision a777087be6) [arm64-darwin23] (base) bryanabuchery@Abuchery ~ % gem install bio Fetching bio-2.0.5.gem Successfully installed bio-2.0.5 Parsing documentation for bio-2.0.5 Installing ri documentation for bio-2.0.5 Done installing documentation for bio after 2 seconds 1 gem installed

A new release of RubyGems is available: 3.5.11 → 3.5.12! Run gem update --system 3.5.12 to update your installation.

(base) bryanabuchery@Abuchery ~ % gem update --system 3.5.12 Fetching rubygems-update-3.5.12.gem Successfully installed rubygems-update-3.5.12 Parsing documentation for rubygems-update-3.5.12 Installing ri documentation for rubygems-update-3.5.12 Done installing documentation for rubygems-update after 0 seconds Parsing documentation for rubygems-update-3.5.12 Done installing documentation for rubygems-update after 0 seconds Installing RubyGems 3.5.12 Successfully built RubyGem Name: bundler Version: 2.5.12 File: bundler-2.5.12.gem Bundler 2.5.12 installed RubyGems 3.5.12 installed Regenerating binstubs Regenerating plugins Parsing documentation for rubygems-3.5.12 Installing ri documentation for rubygems-3.5.12

3.5.12 / 2024-06-13

Enhancements:

Bug fixes:


RubyGems installed the following executables: /opt/homebrew/Cellar/ruby@3.1/3.1.6/bin/gem /opt/homebrew/Cellar/ruby@3.1/3.1.6/bin/bundle /opt/homebrew/Cellar/ruby@3.1/3.1.6/bin/bundler

Ruby Interactive (ri) documentation was installed. ri is kind of like man pages for Ruby libraries. You may access it like this: ri Classname ri Classname.class_method ri Classname#instance_method If you do not wish to install this documentation in the future, use the --no-document flag, or set it as the default in your ~/.gemrc file. See 'gem help env' for details.

RubyGems system software updated (base) bryanabuchery@Abuchery ~ % ruby treetrimmer.rb
ruby: No such file or directory -- treetrimmer.rb (LoadError) (base) bryanabuchery@Abuchery ~ % cd Documents/Masters_Genetics/Supporting_Project/Phylogeny_analyses_tests/test23 (base) bryanabuchery@Abuchery test23 % ls Colour_Palette.xlsx Mapping_File.csv ip6k_blast.fasta IP6K Mapping_File.xlsx ip6k_parameter_input.in.txt IP6K.fasta Mapping_File1.csv ip6k_taxonomic_info_clean.txt IP6K.pdf Mapping_File1.xlsx trim_IP6K_Aligned.fasta IP6K_Aligned.fasta Tree_Ranges.csv trim_IP6K_Aligned.fasta.raxml.support IP6K_Folder Tree_Ranges.txt trimmed_IP6K_Aligned.fasta IP6K_Seq.xlsx Tree_Ranges.xlsx ~$Mapping_File1.xlsx IP6K_aminoacids.txt WhatsApp (base) bryanabuchery@Abuchery test23 % ruby treetrimmer.rb trim_IP6K_Aligned.fasta.raxml.support ip6k_parameter_input.in.txt ip6k_taxonomic_info_clean.txt > ip6k_treetrimmer.out ruby: No such file or directory -- treetrimmer.rb (LoadError) (base) bryanabuchery@Abuchery test23 % source ~/.zshrc
(base) bryanabuchery@Abuchery test23 % ruby treetrimmer.rb trim_IP6K_Aligned.fasta.raxml.support ip6k_parameter_input.in.txt ip6k_taxonomic_info_clean.txt > ip6k_treetrimmer.out ruby: No such file or directory -- treetrimmer.rb (LoadError) (base) bryanabuchery@Abuchery test23 % gem install rubygems-update Successfully installed rubygems-update-3.5.12 Parsing documentation for rubygems-update-3.5.12 Done installing documentation for rubygems-update after 0 seconds 1 gem installed (base) bryanabuchery@Abuchery test23 % update_rubygems Successfully built RubyGem Name: bundler Version: 2.5.12 File: bundler-2.5.12.gem Bundler 2.5.12 installed RubyGems 3.5.12 installed Regenerating binstubs Regenerating plugins Parsing documentation for rubygems-3.5.12 Installing ri documentation for rubygems-3.5.12


RubyGems installed the following executables: /opt/homebrew/Cellar/ruby@3.1/3.1.6/bin/gem /opt/homebrew/Cellar/ruby@3.1/3.1.6/bin/bundle /opt/homebrew/Cellar/ruby@3.1/3.1.6/bin/bundler

Ruby Interactive (ri) documentation was installed. ri is kind of like man pages for Ruby libraries. You may access it like this: ri Classname ri Classname.class_method ri Classname#instance_method If you do not wish to install this documentation in the future, use the --no-document flag, or set it as the default in your ~/.gemrc file. See 'gem help env' for details.

(base) bryanabuchery@Abuchery test23 % ruby treetrimmer.rb trim_IP6K_Aligned.fasta.raxml.support ip6k_parameter_input.in.txt ip6k_taxonomic_info_clean.txt > ip6k_treetrimmer.out ruby: No such file or directory -- treetrimmer.rb (LoadError)

I keep getting the same error: ruby: No such file or directory -- treetrimmer.rb (LoadError)

zx0223winner commented 2 weeks ago

Hi note this tree trimmer tools was developed earlier in 2013, might not be compatible with latest ruby version. Please follow the following guidelines from the link https://github.com/zx0223winner/TreeTuner/tree/main/Tutorial/TreeTuner_file_examples/Step11-14_coarse_tuning

To run this script you will need a working installation of Ruby (www.ruby-lang.org; tested with v2.5.1) and BioRuby (www.bioruby.org; tested with v2.0.3).

Type " ruby treetrimmer.rb " to see the usage. A typical command might look like: " ruby treetrimmer.rb [Newick_tree_file] [Parameter_input_file] [Taxonomic_information_file (option)] > output_file".

treetrimmer.rb can be found here https://github.com/zx0223winner/TreeTuner/blob/main/Tutorial/TreeTuner_file_examples/Step11-14_coarse_tuning/treetrimmer.rb