Friday, September 2, 2016

Bioinformatics Week 7

Selection analysis: Tries to identify whether natural selection is occurring or not as well as if the selection is to get rid of a certain sequence or promote a sequence. Then how this selection affects the species. 
3 types of selection

  • Negative: Removes a detrimental mutation. 
  • Positive: Bennificial mutation promoted. 
  • Balancing/Diversfying seleciton: Favors the maintenance of multiple variations of a sequence in a diverse environment. 
When measuring selection there are two standard techniques
  • Tajima's D: Based on a few standard principles. The genetic regions near a region which is being selected for get dragged into the selection process (genetic hitchhiking). The length of the genetic region is dependent on the rate of recombination. Theta equals to Pi when no selection is occurring. When theta is greater than Pi then positive selection is occurring. When theta is less than Pi then balancing selection is occurring. Advantages: Good however can be fooled by other factors (ex:bottleneck mistaken for positive selection). Therefore after you preform Tajima's D you must preform other tests to single out chances of error in your data. 
  • dN/dS: This calculates the ratio of nonsynonmous mutations (change the protein) to synonemous mutations (doesn't affect protein). Very good for figuring out if there are specific sites which are being selected for and then figure out which codons are being selected for. No selection dN/dS=1, negative selection dN/dS<1, positive selection dN/dS>1. 
There are two popular ways of quantifying selection (measuring variation)
  • Theta: Based on the number of variable(changed between species) sites in a sample 
  • Pi: Based on the average number of differences between sequences. More sensitive to the frequency of a variation. 

Bioinformatics Week 6

Coursera Week 5: Phylogenetics
To study Phylogenetics you create visual comparisons between DNA sequences or proteins in the form of a tree. 
Mutation leads to speciation
 
There are rooted trees and unrooted trees. Rooted trees are the ones above, they expand from one point in one direction whereas unrooted trees can go off in many directions. Homeoplasy is when 2 divergent species share a similar characteristic. There are different types of homeoplasy. 
In order to conduct experiments involving phylogenetic you must have good sampling. Some of your samples need to be homologous, independent and variants of the original specimen which the tree is being based off of. Lastly, you need sequence alignments, and statistical support for their arrangement on the tree.

There are two tree building methods:
Distance methods

  • UPGMA
  • Neighbour Joining: Using blosum or PAM matrix to compare, then create a system to rate and scale the distance between the species based on their matrix score. 
  • Good things: They are computationally fast, and there is a singular best tree found in the end. 
  • Bad things: Sometimes there isn't a single best tree 

Character based (discrete) methods

  • Maximum parisomony
  • Maximum likelihood: Evaluates the likelihood of every possible mutation that could occur within a phylogenetic tree for a species to arrive at where it currently is. Then it uses statistical analysis to figure out which has the highest likelihood and assumes that's the correct tree. There are 4 base pairs so in an unbiased model there is a .25 likelihood for one of the 4 base pairs to change to another base pair. Then you multiply it to the 10th with the power of how many nucleotides there are within the sequence you are analyzing and that is the likelihood of a certain mutation. Say you have a sequence 20 base pairs long, and you can say that a certain G substitution you are studying has a .25*10^20 chance of occurring. Then after that it calculates the chances of the this change occurring over time in this fashion (process portion). Advantages: Produces clear results, you can statistically analyze the results you receive, it also gives you the other likely options that it produces. Disadvantages: It is computationally intensive and cannot be applied to large datasets. 
There is something called bootstrapping where you take all possible versions of your phylogenetic tree and then you calculate how many times certain species are grouped together. Here we see that A and B have been grouped together 100% (this number is arbitrary)  and C and D have been grouped together 75%. So it is very likely that A and B and then C and D diverge from a more recent ancestor. 70-90% the relationship is very probable. Anything less means it is a less probable relationship. 

Sunday, August 7, 2016

Bioinformatics Week 5

Coursera Week 3:
Multiple sequence alignments allow you to see the evolution of a species, as well as figuring out which sequences are useful through which sequences are preserved.
To do multiple sequence alignments you need to create a scoring guideline. You must compare columns and then assign a numerical value to rank to homologous columns.
Algorithms that code for MSA (multiple sequence alignment):
Dynamic (better)
Multidimensional dynamic (worse)
Programs that do MSA are Clustal (Progressive MSA) or DIALIGN (Local MSA)

Progressive MSA progressively aligns more distantly related sequences. The sequence is not disturbed during alignment.
Clustal
Insert gaps if you need to in order to better align the sequences
If you place a gap within a sequence you must also add in a deficit for the gap. (subtract points from alignment score for gap insertion.)
Then create a guide tree based on how related the sequences are
These guide trees are phylogenic trees
Clustal is suffers from making the quickest solution rather than the best solution. It looks for temporary fixes (inserting gaps in the quickest place rather than the most strategic) rather than long term fixes. These temporary fixes eventually propagate and lead to poorer total alignment. In order to compensate for the errors made by Clustal there are iterative methods that go through the alignments and then identify the subgroups within the larger allignments that have been aligned with quick fixes, then it fixes the temporary fixes with long term fixes and then reinsert them into the total sequence to be realigned.
Once Iterative programs have fixed the temporary fixes, it goes through and then fixes the alignments again, it then goes through the newly aligned sequence it has just created and creates a phylogenetic tree, then it determines the MSA, scores the MSA and then compares that score with the original score of the Clustal alignment it fixed, and asks whether the score is better or not. If its better it goes back and realigns everything again and if its not better then its done. It runs in a circle constantly trying to better the alignment, each time it gets a better alignment it keeps realigning till it hits a point when the alignment cannot get better.
Dynamic substitution matrices are used in order to compare sequences once they are aligned. It uses lower value Blosum matrices for lower scored alignments.  (These matrices are used in BLAST).

Then there is Local MSA (DIALIGN)
Which compares sequences of DNA within a global sequence (total sequence) which are in different places known as diagonals.
 This is basically what DIALIGN does. It then weighs the worth of each diagonal, based on length.

To compare sequences which are related use Clustal
To compare sequences which are unrelated and have conserved regions that are consistent use DIALIGN
To compare sequences which are unrelated and have conserved regions that are non consistent use MAFFT
Protein is easier to align than DNA. DNA gets the score of 1 if it matches, 0 if it doesn't. But proteins have amino acids which are redundant so it's easier to find a match.
*Too many caps or insertions or columns that don't match means that something is wrong with the alignment.
Using MSA programs is a skill. It is very easy to get poor MSA results using Clustal (the most popular website.) While using any of the MSA programs it is very important that it is not full proof and you cannot trust the results produced.
When you use global alignments:
When the sequences can be aligned through the entire sequence. If the sequences are of different lengths then you can insert gaps in order to compensate for the different sizes and then align.
When you use local alignments:
When the sequence can only be aligned at certain areas of the sequence.
When you use NCBI downloads of sequences in order to input them into MSA programs it is important to note that their names are incredibly lengthy. You must learn Perl, Python or Ruby in order to rename the files and make things very simple.
MEGA:
MSA program MEGA is very good at taking DNA translating it into protein, aligning it and then retranslating it back into DNA. This is a very useful tool, however it must be used carefully because only a small percentage of DNA sequences code for protein. You also must make sure that the sequence you are inputting is the full sequence, if you start at a different point than the starting point then the sequence is read incorrectly because it is read in codons and it will code for the wrong protein.
DIALIGN
When you have sequences that are unalignable but have short conserved regions, it is best to use DIALIGN. DIALIGN is also very good at the DNA to protein conversion.
MAFFT
The best tool to use for general MSA problems that MEGA or Clustal struggle with. The setbacks presented with the Clustal process are fixed with MAFFT. MAFFT automatically accounts for the quality of the MSA score by looking at the number of inserts and lessening the MSA score accordingly. It also works at incredible speeds considering the amount of work it is doing.
Programing words:
Regex (regular expressions) this is programing a system to associate what you input as what it has in its system. For example, looking up obvi and having obviously come up. It makes it easier and more efficient for you to research. You will have to know Ruby, Perl or Python to do so. Crimson is a good way to work with regex.
***MSA is integral for solving the issue the lyme disease paper brought up. The genomes of all of the strains of lyme disease must be sequenced and after they are sequenced you need to run them through an MSA program in order to see which parts of the sequence are conserved throughout the species and which are not. This can help determine which sequences are essential to the functioning of lyme disease and which sequences are associated with the differentiation and adaption of the strains. Because MSA uses the scoring Matrices it is also vital to master those.

Sunday, July 31, 2016

Summer Research Week 5 (08/01 - 08/05)

Great progress! This week there will be two major focuses:

Bioinformatics
  1. Bioinformatics Methods I, Coursera: Go through the materials of week 3.
Python & NLTK
  1. In order to apply Natural Language Processing (NLP) to biomedical fields, you will have to learn a programming language- Python and a platform- Natural Language Toolkit (NLTK). 
  2. Go to https://www.python.org/downloads/ to download and install the most recent version (3.5.2) of Python.   
  3. Launch the "Terminal" in the Applications > Utilities folder. In the terminal, run the following commands: (Let me know if you have any problem. I have tried a few times, and finally made it work.)
    • Install pip: run sudo easy_install pip 
    • Install NLTK: run sudo pip install -U nltk 
    • Install Numpy: run sudo pip install -U numpy 
    • Run Python: run python
    • Test installation: type import nltk
  4. Now, you can go to http://www.nltk.org/, and follow the "Some simple things you can do with NLTK".

Thursday, July 28, 2016

Bioinformatics Week 4

Lyme Disease:
Trying to determine which variations in genomes are stochastic(random) or selectively chosen by natural selection is difficult and takes a in depth understanding of the ecological and clinical conditions the strain has undergone. The natural selection that strains undergo is mostly due to host adaption.There are two hypotheses that surround how within the same region such different strains can arise.
  • Multiple Niche Polymorphism(MNP): The different strains are able to survive and thrive in the same region because they occupy different niches; different hosts, tissue types, and which organism carries the disease. Host adaption. 
  • Negative Frequency-dependent Selection(NFD): The ability to evade a hosts immune system requires many varying strains because they have to adapt to their specific host. Immune-escape mechanisms. 
In order to test which hypothesis is correct you can see whether the house keeping genes are maintained or not. A high amount of non-synonymous DNA in the house keeping genes would imply that NFD is the correct hypothesis and a high amount of synonymous data would suggest MNP is correct. There is also a chance that both hypothesi are correct it could be the working together of immune escape mechanisms and host adaption.
Mapping the genome and tracking adaptions is also helpful for predicting what future threats lyme disease could cause. Once you predict the variation in the strains then you could hopefully predict what changes have occured ecologically, climate wise, and migration wise.
Based on the current genomes that we have mapped we can recognize that some swapping of DNA has occurred. We can look at when recombination began occurring between strains based on how much recombination has occurred. If it is low, then it is recent, high then it started further back in history.
Sequencing genomes would also allow researchers to track the migration of a strain based on the crossing over that occurred between species and using the fact listed right above this. By comparing the date of migration and ecological events that occurred in the area they migrated from you can predict what will cause a strain to migrate.
With the strains of lyme disease become more and more diverse as well as more and more spread recombination will occur at a far faster rate creating an even more diverse selection of strains. The more diverse the more threatening lyme disease is to the public.
What bioinformatics can do for this field
  • Creating a linkage map between all the SNP's of the Borrelia genome using population genomics
  • Figuring out which genetic changes are associated with which strain and what that change does and what causes it using phylogenomics
  • Testing the ecological hypotheses mentioned in this paper (MNP, NFD) by estimating population size, migration rate, strain frequency and the crossing of genomes by using genome-level phylogeography.
Progress to keep in mind:
 

Bigger picture:

Understanding a highly adaptive bacteria genus like Borrelia will help researchers understanding how bacterial genomes evolve.

In order to tackle the problems listed above, I need to master population genomics, phylogenomics and phylogeography.


Key facts to understand about Borrelia:

  • Plasmids of bacteria differ but they have a set genome outside of the plasmid. 
  • PF54 gene is responsible for evading immune system
  • OspC, dbpA,vls, b08, and a07 are all antigen genes responsible for diversifying selection 
Statistics: MUST RESEARCH LATER ON
  • Bayesian 

  • Markovian
  1. Hidden Markov Models (HMMs) are statistical models for sequential data. 
  2. They are used for programing artificial intelligence, modeling biological sequences, pattern recognition (can be used in basic programing?)

Monday, July 25, 2016

Summer Research Week 4 (07/25 - 07/29)

You will get one more week to study in details about the Lyme disease review paper (Evolutionary Genomics of Borrelia burgdorferi sensu lato- Findings, Hypotheses, and the Rise of Hybrids). You might want to use some references to explore and expand your understanding to the next level. Don't forget to add any useful resource to the "Project Resource" page. 

Friday, July 22, 2016

Bioinformatics Week 3

Lyme Disease
Lyme disease is constantly changing. There are many strains of the pathogen and these strains are constantly switching DNA, therefore their genome is constantly adapting and changing making it hard to treat. The diversity within the strains of pathogens is caused by the different species that host the disease, each strain adapts to its host and it's immune system. Overarching question: What are the mechanisms for adaption? What edits in the genome cause which adaptions? How to answer these questions: Constant genome sequences of the strains
Lyme disease has the most complex prokaryotic genome known. In databases there are a total of 30 strains of lyme. The issue to tackle is the growing number of differentiating genomes of lyme.
Researchers hoping to find the reason for the increased virulence within certain strains try to compare genomes, however the issue with genotyping the pathogens is that the majority of genetic differences between strains do not actually cause any phenotypic variation and are not found to affect the traits researchers are interested in.
You can compare the genomes based on what is the preferred host of that strain. This method of comparing the differing genomes of pathogens that pray on different species is a underdeveloped field in bioinformatics. Current databases which contain genome comparisons focus more on multiple gene sequences rather than the sequence for the antigen.
You can identify the function of a gene based on its genetic ancestors and then the ecological factors that would have caused it to change (phylogenomics). Then using this technique you can also predict the mutations that are to come.
Bacteria has a special mode of recombination for which special techniques of analyzation have not been made. They have two unique patters of linkage disequilibrium. The genealogy of a bacterial genome can be discerned using one coalescent tree because of a genome wide clonal frame. Second, the linkage disequilibrium between two touching SNPs occurs less frequently with an increased amount of gene conversion(a sequence of DNA is replaced by an identical sequence of DNA). The more recombination occurs within a genome the bigger the sample size you need in order to detect disease causing agents. Therefore, in order to detect what sequence allows the bacteria to have a higher virulence you need to have a large sample size and analyze their SNPs. Once again, the necessity for this discovery leads to a necessity of the sequencing of every genome within this bacterial family.
Genome sequencing discoveries:


  • Loss of OspB may be host adaption
  • a70 allows strain to evade immune system
  • PF54 gene most variable region of DNA, reason for vast speciation
Use Phylogenomic analysis to see which sequences are involved in adapting to host and ecological differences. There is also phylogenic footprinting which predicts which regions of a sequence are gene regulatory based on which are the most conserved regions of the sequence. This is dependent on the assumption that non coding and cis regulatory sequences undergo mutations at a slower rate than coding sequences. In order to have more accurate phylogenic foot printing results, it is necessary to be searching through as many genomes as possible. It is important to have a diverse data set when analyzing changes and continuities in genomes.
There is also population genomics which focuses on what ecological and evolutionary forces caused the change in genome.


Pan genomics
Pan genomics is the compilation of all genes within a species. It is the complete genome and it can be used to track the gains or loses within a genome using mathematical calculation. Pan genomics is studied using blast however that means that the values are dependent on the e value cutoffs as well as the length coverage of the Blast. There isn't much horizontal gene transfer within the genome of B. burgdorferi s.l., so the majority of changes within it's genome are due to duplications and losses of homologous genes and sequence variations within orthologous genes. Even though horizontal gene transfer between distantly related members of this bacterial family, it is necessary to sequence the genomes of numerous other members so that we can have a more complete idea of what genes control what and how they adapt to clinical and ecological circumstances. We can analyze the plasmids within closely related strains and then use that analysis to understand which genes aid in the organisms adaptions to it's environment. Using ortholog-ortholog comparison you can figure out the possible functions of genes that somehow confer resistance such as PF54. You can basically map the genes history by doing these comparisons.
Bioinformatics framework
Manual curation of information extraction has become impossible due to the increasing amount of literature.
BioTM includes
IR:information retrieval, IR processes your input and finds subsequent links and literature which are associated with your query.
IE:information extraction, IE takes the information you're looking for out of the paper? Uses NLP Natural language processing, DM dating mining. Or maybe it just highlights the information related to what you need.
HG:hypothesis generation, ?
Using NERs to sort literature is very unreliable due to the differing language used to depict the same entity. Rule based systems attempt to aid in bridging this gap by creating algorithms that understand rule like ase equates to enzyme.
Here are DM techniques used to normalize the nomenclature to enhance TM outcomes, these are very time consuming to create
  • Hidden Markov Models (HMM)
  • Naive Bayes
  • Conditional Random Fields (CRFs)
  • Support Vector Machines (SVMs)
The big thing now is Relationship Extraction, RE.
A big issue with BioTM is that they fail to work in tandem with the biomedical community that could greatly benefit from their tools. Also, the tools that are available often take expect programming skills which limit the pool of users. The TM industry is more focused on creating novel techniques rather than integrating their programs into the research world. Another issue is the privatization of papers which prevent TM systems from retrieving data from complete papers rather than just the abstracts.
HOW TO FIX THE PROBLEMS PRESENTED: @Note: The Ikea of Bioinformatics


  • Biologists and bioinformatics people need to work together to create widely usable programs through @Note
  • @Note is basically the baseline bioinformatics program which researchers can customize to fit their own needs. @Note demands basic skills like POS, Part-of-speech, tagging and lexicon based semantic tagging. However it will be able to perform many highly complex processes which will allow the researchers to have a access to very useful tools without the need for an experienced skill set.
  • The face page seems highly interactive and user friendly
@Note has 3 user possibilities
  • Biologists: Can use this program to retrieve biomedical texts, annotation and curation.
  • Text Miner: Can use this program to analyze texts.
  • Application developers: Can use this program to easily design applications for bioinformatics.
How it works:
You search for something, initially it searches the PubMed database and pulls up any articles that contain the query. Then if you don't have a subscription to PubMed or other subcriptional databases then it does a web crawl and drags up any articles open to the public containing your query and then any articles that are abstract only on PubMed but public on another site. Then it will automatically site the paper for the researcher.  Although, this program does have this built in search method other parts of the program need to be built from scratch.


The program was coded using AIBench a program under Java. It has plug-in in well known tools like WEKA, YALE and GATE.