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

input directory #32

Open
Ahmed-Shibl opened this issue Dec 5, 2018 · 3 comments
Open

input directory #32

Ahmed-Shibl opened this issue Dec 5, 2018 · 3 comments

Comments

@Ahmed-Shibl
Copy link

Is there a way to use a folder containing the proteomes to be analyzed as input instead of adding each one individually in the command line:
bcgTree.pl --proteome bac1=bacterium1.pep.fa --proteome bac2=bacterium2.faa --proteome bac3=bacterium3.pep.fa --proteome bac4=bacterium4.faa

I want to generate a tree for ~30 proteomes using the command line..

@iimog
Copy link
Member

iimog commented Dec 5, 2018

Hi @Ahmed-Shibl,

this is currently not implemented. I guess it should not be too hard to do but I'm not sure when I will have time to do it. There are some things to consider, e.g. taking all files or just those with specific suffixes, automatically generating the name from the file name (requires the filenames to be sensible and not contain spaces or other illegal characters)... I used a for loop to write my proteomes to an options file for trees of 100+ proteomes in the past. So in your case you could run this in your folder:

for i in *.pep.fa *.faa
do
  name=$(basename $i .pep.fa)
  name=$(basename $name .faa)
  echo --proteome \"$name\"=\"$i\"
done >bcgTree.options

This will create a bcgTree.options file with this content:

--proteome "bacterium1"="bacterium1.pep.fa"
--proteome "bacterium3"="bacterium3.pep.fa"
--proteome "bacterium2"="bacterium2.faa"
--proteome "bacterium4"="bacterium4.faa"

Then run bcgTree.pl @bcgTree.options along with any other options you want to set, either added to the options file or on the command line. Let me know if that works for you for now or if you need this feature urgently. I will leave this open as a legit feature request anyway but the priority depends on you.

@chiras
Copy link
Collaborator

chiras commented Dec 5, 2018

Hey,
you can use the bcgTree.pl [@configfile] option to provide your proteomes (and other options) as a file.

To generate such file, you could use basic unix commands,
e.g. ls *.faa | sed "s/^/--proteomes /".

@Ahmed-Shibl
Copy link
Author

@iimog
First off, thanks for the information and tips on how to go around this. I created the file I needed using @chiras 's unix command (thanks!) and it worked well. Glad you think it's a legit feature request and I understand that you might not have time to incorporate this feature at the moment but I personally think it will be worth it! Thanks again!

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

No branches or pull requests

3 participants