Monday, December 29, 2014

.Fasta Data Grabber

This will download .fasta files from a site and you can add the web crawler I demonstrated earlier or use a pseudo random string generator if the final ALPHANUMERIC piece is very diverse.


browser.Navigate("http://www.organization.org/whatever/ALPHANUMERIC.fasta")

Dim delLineIndex As New List(Of Integer)
delLineIndex.Add(1)


Adress.text=browser.document.Title;
Adress.text=Replace(Adress.text,"http://www.ORGANIZATION.org/WHATEVER/","")
Adress.text=Replace(Adress.text,".fasta","")



Dim openStream = New StreamReader("F:\Latest.txt")
Dim saveStream = New StreamWriter("F:\"+Adress.text+".txt")


Dim lineStr As String = ""
Dim lineIndex As Integer = 0
Do
    lineStr = openStream.ReadLine()
    If lineStr Is Nothing Then
        Exit Do
    Else
        lineIndex += 1
        If Not delLineIndex.Contains(lineIndex) Then
            saveStream.WriteLine(lineStr)


        End If


    End If
Loop Until lineStr Is Nothing
openStream.Close()
saveStream.Close()

Friday, December 12, 2014

Online VD Updates



Programmers and researchers alike can now collaborate in real time to work on computer or genetic code.

Thursday, December 11, 2014

Computerized DNA Alignment with Compression Variables

I wanted to include a DNA alignment operation in the VD program so I the following algorithm:

DNA can easily be aligned by computerized manipulation of multilevel symbolic variables. For example, if we take a strand:

Actgcaatgccctcagcatgcatatagga

And wish to compare it with:

Tcaaaactgactaaccctcagcatacgta

Then we can start with string a by creating each set of three into letters:
Act=A and so on.


Then we apply these values to the second string. The letters will match up as they do in the first. Then we repeat the matching step so that strings of matching letters are folded and compressed repeatedly, like ladders. Once the minima is reached, the appropriate ladders are expanded and the sequence is thus aligned.

Wednesday, December 10, 2014

Gene Editor

The VD Editor is very good at making coding a faster and slicker process. I thought it to be time to make it an editor of genes, creating tools for analyzing sequences as well as ways of designing custom genomes. Here is how it works:

We start with some Jquery to handle the lightweight text operations, like switching out acronyms and words for protein sequences. First make some html:



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<body bgcolor = "#303030 ">


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>

<style>
  #sideBar { vertical-align:top;}
  #contentArea { vertical-align:top;}
</style>
<table>
  <tr>
    <td id="sideBar">
 
      </td>
    <td id="contentArea">
      
      
<textarea name="texty" id="field_id_29" rows="40" cols="100" style="color: #0086f7; background-color: black;font-weight: bold; font-family: source code pro; font-size:11; "></textarea>

Note the linking of the jquery source into the file. This demands that our application work online. I used this method for future cross platform building ease:

We can add some JS and JQ:

1
2
3
4
5
         $("#field_id_29").bind("keyup", function() {
    var text = $(this).val();
    text = text.replace("alanine", "A" )
    $(this).val(text);
});

The above allows direct addition of amino acids into the sequence following using the Uniprot coding system.

Now for the big switcharoo:


1
2
3
4
5
6
7
8
       
var capsacine_synthase="MIFILTVNFRWRYLILLICKSLMLLEISCPVKYPERFLGVCDTLIFRQTCLQEIFRGTCRICLSCFLLIFLTIVFPAKFRRVLVGFSSFSTFGSRIMTWLELCLRQLLTVRRWFIECLRKCYSRCYSSGNCCFTKASGDIFITYYSVWFFASFIVLQCFDLSSFPWDCSVGFQWVYGYCQARVSKMFYFLANFGSSTQPNTWCVSFDFDEQFCIDVVGRIVEFVLWENPKCHWELVEIGVTENGKQFIDRWSPVFDYELVQLEGSCSIRESNEGENSNVFRLSQKLEDIITGKKSVFGFHSFAFVKFD"

  $("#field_id_29").bind("keyup", function() {
    var text = $(this).val();
    text = text.replace("capsacine synthase", capsacine_synthase )
    $(this).val(text);
});

Now we employ VB for heavy text operations so integrate the js doc via a we bowser.  Before we start messing with whole genomes lets add a method to identify major sequences. this is the basic method:



1
            buildbox.Text = Replace(buildbox.Text, "tata", "tataSTARTSTART")
Let's make sure we are online:



1
2
3
4
5
6
7
   If My.Computer.Network.IsAvailable Then
            adder.ForeColor = Color.Green
            adder.Text = "Internet Connected"
        Else
            adder.ForeColor = Color.Red
            adder.Text = "Internet Disconnected"
        End If


And we load text files for large data segments such as the entire genome of synechocystis. And there you have it , a basic sketch of the gene editor. It willb e embedded int he next VD release.