veg / hyphy-analyses

HyPhy standalone analyses
MIT License
37 stars 17 forks source link

How to choose a foreground branch to test? #14

Open astridlee opened 3 years ago

astridlee commented 3 years ago

Hi,

Hyphy team.

I'd like to set one or two specific foreground branch to test using BUSTED-MH.

My code is: hyphy BUSTED-MH.bf --alignment filter.fasta --tree tree.tre --srv Yes --branches A, (A refers to the species name that I'd like to set as foreground branch) which shows that "A" is not a valid choice passed to 'Choose the set of branches to test for selection' ChoiceList using redirected stdin input or keyword arguments. Valid choices are All, Internal, Leaves, Unlabeled branches.

Above all, how should I set my specific foreground branch to test ? or could I set above two branches as foreground branch to test?

I'm looking forward to your reply.

spond commented 3 years ago

Dear @astridlee,

You need to annotate your tree string, using the {} notation before you use it in an analysis, like in

((A{test},B), (C,D{test})...

See http://www.hyphy.org/tutorials/phylotree/ for a tutorial on how to do this interactively.

Best, Sergei

astridlee commented 3 years ago

Hi,

Sergei.

Thanks for your reply and after adding the {test} behind the species that I'd like to set as foreground branch, and it really works.

I was wondering if I can ignore the "branch" parameter in my code when I added the {test} in my tree file, as the following shows:

hyphy BUSTED-MH.bf --alignment filter.fasta --tree tree.tre --srv Yes

Thanks for your help again.

Best, Astrid

spond commented 3 years ago

Dear @astridlee,

The default value for branches is All, so if you do not specify --branches test, the test will be run on the entire tree:

$hyphy busted --help

Available analysis command line options
---------------------------------------
Use --option VALUE syntax to invoke
If a [reqired] option is not provided on the command line, the analysis will prompt for its value
[conditionally required] options may or not be required based on the values of other options

code
    Which genetic code should be used
    default value: Universal

alignment [required]
    An in-frame codon alignment in one of the formats supported by HyPhy

tree [conditionally required]
    A phylogenetic tree (optionally annotated with {})
    applies to: Please select a tree file for the data:

branches
    Branches to test
    default value: All

srv
    Include synonymous rate variation in the model
    default value: Yes

rates
    The number omega rate classes to include in the model [1-10, default 3]
    default value: busted.rate_classes [computed at run time]

syn-rates
    The number alpha rate classes to include in the model [1-10, default 3]
    default value: busted.synonymous_rate_classes [computed at run time]

grid-size
    The number of points in the initial distributional guess for likelihood fitting
    default value: 250 [computed at run time]

starting-points
    The number of initial random guesses to seed rate values optimization
    default value: 1 [computed at run time]

output
    Write the resulting JSON to this file (default is to save to the same path as the alignment file + 'BUSTED.json')
    default value: busted.codon_data_info[terms.json.json] [computed at run time]

save-fit
    Save BUSTED model fit to this file (default is not to save)
    default value: /dev/null

Best, Sergei

astridlee commented 3 years ago

Hi,

Sergei.

Thanks for your kind reply to my simple questions, it really helps me a lot.

Best, Astrid