input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public int get sample frequency return user sample frequency | retrieve the user supplied non default collection frequency |
protected void add depth labels to tree int height last tree get max height array list individual tips last tree get tips for individual tip tips int dist tip dist to root tip set depth height dist | sets the depth field of all tips to the correct value |
public int get sample frequency return integer max value | we never want |
public void set sample frequency int freq has user supplied sample frequency true user sample frequency freq add xmlattr tjxmlconstants samplefrequency string value of freq | sets the sample frequency |
public void write another line int gens string builder line new string builder line append gens t for statistic stat stat list if stat show on screen log string str stat get screen log str if str null line append str t else line append na t for print stream stream streams stream println line | write an additional line from all statistics to all streams |
public void write tree log line discrete gen tree tree write to the tree log if trees stream null trees stream println demo model get current gen number t tree get newick | write a new tree to the tree log file |
private double calculate mu pair dnasequence one dnasequence two double sum 0 for int i 0 i math min one length two length i if one get base char i two get base char i sum return sum double math min one length two length | counts the total number of differences between two sequences |
public boolean show on screen log return true | show on screen log and we accept the default formatting version |
public void set trees stream print stream file ps trees stream file ps | stream to write tree info to |
public string get option description return null | a user readable string that describes the option required |
public int compute seg sites from sample list individual sample int seg sites 0 dnasequence ref sample get 0 get primary dna for int j 0 j ref length j char ref base ref get base char j for int i 1 i sample size i dnasequence comp sample get i get primary dna if comp get base char j ref base seg sites i sample size ret... | compute and return the number of segregating sites in the given sample |
public void collect statistic collectible pop if collect data collect pop | collect data for this statistic |
public boolean requires preserve ancestral data return false | some statistics require the use of ancestral genetic data |
public string get screen log str double val get last value if val double na n return na n else return formatter format val | string that is written to the log |
private int count difs dnasequence one dnasequence two int sum 0 if start site 0 end site 0 for int i 0 i math min one length two length i if one get base char i two get base char i sum else for int i start site i math min one length end site i if one get base char i two get base char i sum return sum | returns the total number of sites which differ between two dna sequences |
public char get base char int which if bits1 get which if bits2 get which return a else return g else if bits2 get which return c else return t | returns a char representing the base at a given position |
public void mutate mutation model mutate this | mutate this sequence |
public string get string value string buffer buf new string buffer for int i 0 i length i buf append get base char i return buf to string | a string representation of this sequence |
public int get total nodes if root null return 0 else return sub tree size root | returns the total number of nodes |
public int get num leaves if root null return 0 else return num descendent leaves root | the total number of tips individuals with zero offspring |
public void add progress listener progress listener pl prog listeners add pl | things that should be notified of the progress of the simulation run |
public void set auto shorten root boolean auto shorten this auto shorten root auto shorten | turns on off automatic moving of population root up the tree each round |
private void load settings from string string settings str try file tmp file new file tjtmp xmlsettingsfile file writer writer new file writer tmp file writer write settings str writer close import settings from file tmp file false catch ioexception ioex system err println error reading settings | loads settings into the gui from the string provided |
public string get newick string buffer str new string buffer int i for i 0 i root num offspring 1 i str append get newick subtree root get offspring i 1 str append str append get newick subtree root get offspring i 1 str append if root get label null str append root get label str append return str to string | obtain a newick representation of this tree |
public boolean has completed return completed | returns true if this runner has reached the final generation |
public boolean is preserve return preserve | a flag to mark this individual for non removal from the population |
public output manager get output handler return output handler | get the current output manager object |
public void write to xml xmlstream writer xml writer throws xmlstream exception run settings options ops new run settings options get run length get burnin gens write to stdout write to file write summary get write fasta get write separate fastas get write trees with fasta get fasta sample frequency get save trees get ... | write the current settings to the given xml writer |
public void set output handler output manager output this output handler output | set the current output handler |
public int get max height array list individual tips this get tips int max height 0 int i for i 0 i tips size i int dist get dist to root tips get i if dist max height max height dist return max height | returns the maximum distance from any tip to the root of the tree |
public int get current gen number return current gen | total number of times new gen has been called |
public void set current gen number int gen this current gen gen | set the current generation number value |
public void change master sequence dnasequence new master try for individual ind pop dnafitness dna fitness dnafitness ind get fitness data dna fitness set master sequence new master catch class cast exception cce error window show error window new illegal state exception cannot set the master sequence for individuals ... | change the master sequence for all individuals |
public void stop if run worker null paused false run worker cancel true simulation is done running false | stops the simulation entirely cannot be restarted |
public void remove from pop if preserve return int depth 0 individual ref this while ref get parent num offspring 1 ref get parent is preserve ref ref get parent if ref get parent null system out println individual has no parent at depth depth system out println id is ref get readable id depth ref get parent remove off... | remove this individual from the population and all ancestors of this individual as |
public void mutate fitness data mutate if inheritables null for inheritable item inheritables item mutate | calls mutate on the fitness data and all inheritables |
public void import settings int op file chooser show open dialog this get frame if op jfile chooser approve option file input file file chooser get selected file import settings from file input file true | import settings from a file that the user selects |
public void update progress int prog string str for progress listener pl prog listeners pl set progress prog str | called periodically by the run worker to set the progress level |
protected void add xmlchild xmlparseable child if children null children new array list xmlparseable children add child | add a new xml node as a child of this node |
protected void add xmlattr string key string value if xml attrs null xml attrs new array list key value pair if we already have an attribute with the specified key we over write the old value with the specified value for int i 0 i xml attrs size i if xml attrs get i key equals key xml attrs get i value value return xml... | add a new xml attribute to this node |
public void inherit from individual parent fitness data parent get fitness data if inheritables null inheritables clear for inheritable item inheritables inheritables add item | this just passes references from the parent data to the offspring |
public void set tree sample size int size tree sample size size | set the number of tips to use in tree collection |
public void copy data from individual ind if inheritables null inheritables clear for inheritable item inheritables inheritables add item get copy origin pop ind origin pop fitness data ind get fitness data get copy | copies data from source individual ind |
public individual get ind int which if which pop size return null else return pop get which | returns the individual at index which in the population |
public demographic model get demographic model return demo model | return the current demographic model |
public void new gen new gen pop size | creates a new generation with the same size as the previous generation |
public void shorten root while root num offspring 1 root set parent null root root get offspring 0 | move the root toward the tips while root has only a single offspring |
public void initialize random engine rnger population source int n this rng rnger uni generator new uniform rng list individual founders source get sample n pop new array list individual founders size for individual founder founders individual ind new individual rng ind set parent founder founder add offspring ind ind ... | initialize this population by taking n individuals from the given source population |
public void add individuals list individual migrants for individual ind migrants pop add ind | add the sample of individuals to the current population |
public void set username string username if username null string msg can t set username username was null logger error msg throw new runtime exception msg this username username trim | set the username used by this stub in http basic authentication |
public void set password string password if password null string msg can t set password password was null logger error msg throw new runtime exception msg this password password trim | set the password used by this stub in http basic authentication |
public void set trust all servers boolean is trust all servers this trust all servers is trust all servers | set whether for ssl connections all servers should be trusted |
public void add workflow state listener string workflow instance id workflow state listener workflow state listener throws unknown workflow instance exception synchronized listeners map array list listeners null listeners array list listeners map get workflow instance id if listeners null listeners new array list liste... | a a listener of the state of a workflow |
public long get millisecs return t point get time | this method provides the time between this timepoint and |
public void set pausing pausing true | implements the sub state pausing |
public void pause flow flow if flow is pausing flow set pausing flow pause tasks | implemetns the pausing of the flow |
public void unset pausing pausing false | implements the sub state notpausing |
public void task running task task flow flow task get flow flow remove paused task task flow add running task task flow set state flow state running flow state changed flow | tasks resuming while the flow is in paused state need to be handled |
public void task complete task task flow flow task get flow flow remove running task task flow remove paused task task if flow get running tasks size flow get paused tasks size 0 flow handle complete flow set state flow state complete flow state changed flow else if flow get running tasks size 0 flow get paused tasks s... | handles complete events |
public void task paused task task flow flow task get flow flow remove running task task if was in running tasks list will be removed flow add paused task task | tasks pausing while the flow is in failing state need to be handled |
public void task failed task task flow flow task get flow flow remove running task task if flow get running tasks size flow get paused tasks size 0 flow set state flow state cancelled flow state changed flow | handles a task failure event |
public void task complete task task flow flow task get flow flow remove running task task if flow get running tasks size flow get paused tasks size 0 flow set state flow state cancelled flow state changed flow | handles a task complete event |
public void task cancelled task task flow flow task get flow flow remove running task task flow remove paused task task if flow get running tasks size flow get paused tasks size 0 flow set state flow state cancelled flow state changed flow | handles a task cancelled event |
public void set task flow flow task flow task flow task flow task flow add flow state listener this | sets the nested flow |
public void handle pause try task flow pause catch exception e fail e to string | pauses the nested flow |
public void handle cancel try task flow cancel catch exception e fail e to string | cancels the nested flow |
protected void handle run run event run event try task flow run catch exception e fail e to string | runs the nested flow |
protected void handle resume run event run event try if task flow get state flow state new handle run run event else task flow resume catch exception e fail e to string | resumes the nested flow |
public void cancel abstract task task if task is pauseable task handle cancel matskan note pause able tasks are those who can be paused while running else task stop timer task set state task state cancelled task state changed task task task cancelled | cancels a paused task |
public void cancelled abstract task task task stop timer task set state task state cancelled task state changed task task task cancelled | interruptible task is now cancelled |
public void fail abstract task task string message task stop timer task handle fail task set error message message task set state task state failed task state changed task message | interruptible task is failed while being cancelled |
public void pause abstract task task task handle pause | pauses a running task |
public void paused abstract task task task stop timer task set state task state paused task state changed task task task paused | indicates that interruptible task is now paused |
public void cancel abstract task task task handle cancel | cancels a running task |
public boolean is pauseable return is pauseable | return if this task can be paused while running |
public boolean is cancelable return is cancelable | return if this task can be cancelled while running |
public string run throws exception string buffer messages new string buffer try wsflparser parser new wsflparser workflow spec flow model flow model parser get flow model boolean valid wsfldi graph generator validate flow model validate flow flow model catch wsflinvalid exception ex messages append failure ex get messa... | checks that the wsdl for each activity is discoverable |
public boolean email notify enabled if notify email address null return true else return false | test if email notification has been choosen |
public void commence eviction if exited logger info commencing evictor synchronized lock stop false exited false rerun true this thread new thread this this thread start else synchronized lock if rerun rerun true this thread interrupt | instructs the evictor to commence background eviction of stale workflows as they appear |
public string get workflow spec return workflow spec | retrieve the workflow spec for the submission |
public void evict synchronized lock this thread interrupt | instructs the evictor to check for workflows ready for eviction now |
public string get input data return input data | retrieve the input data for the submission |
public string get user namespace cxt return user namespace cxt | retrieve the context identifier for this user |
public string get email address return notify email address | retrieve the email address |
public void suspend flow string identifier throws workflow command exception throw new workflow command exception sorry this functionality is not yet available | provides for suspending a workflow previously submitted to the flow engine |
public void resume flow string identifier throws workflow command exception throw new workflow command exception sorry this functionality is not yet available | provides for resuming a workflow previously suspended |
public void release flow flow receipt receipt throws workflow command exception try get the flow flow flow flow registry get instance get flow receipt get id flow command handler command handler flow command handler get instance command handler put new flow command event release flow with id receipt get id flow flow co... | signals to the flow engine that a flow can be released |
public string get wsflspec return wsfl spec | retrieve the workflow spec for the submission |
public string get notify email address return notification email address | retrieve the notification email address |
public boolean email notify enabled try and create address for it try internet address to address new internet address notification email address catch exception ex return false return true | test if email notification has been choosen |
public long get execution time so far if start time null return 0 else if end time null return system current time millis start time get millisecs else return end time get millisecs start time get millisecs | returns the time spent executing so far |
public void notify flow message msg can notify standalone client about finalised execution string flow id msg get flow id notify listeners flow id | process message associated with submitted flow |
public element to xml return new element target todo | construct an xml representation of this object |
public element to xml return new element activity todo | construct an xml representation of this object |
protected element fetch target element element implement m element get child implement element export implement get child export element target export get child target return target | fetches our great great grandchild target element |
public element to xml return new element data link todo | construct an xml representation of this object |
public element to xml return new element control link todo | construct an xml representation of this object |
public string get service provider type return m service provider type | returns the service provider type attribute value |
public list get service providers return m service providers | returns a list of service provider objects |
public list get activities return m activities | returns a list of activity objects |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.