Sunday, 12 April 2020

Encoding

Hi all,

Pls find the encoding program.

------------------------------------------------
//text=fileread(fullpathname);
text='HUP'
ASCII = double(text)
A=dec2bin(ASCII,8)

B= logical(A - 48)

 m=size(B,1)
 n=size(B,2)

p='A'
q='C'
r='G'
S= 'T'

k=1
 x=.4;
h=waitbar(x,'Process start');
for i=1:m
for j=1:2:n
if (B(i,j)==0 && B(i,j+1)==1)
sc(k)=p
elseif (B(i,j)==1 && B(i,j+1)==0)
sc(k)=q
elseif (B(i,j)==0 && B(i,j+1)==0)
sc(k)=r
else
sc(k)=S
end
k=k+1
end
end
p53nt = fastaread('p53nt.txt')
j=1
for i=1:4:length(sc)
k=strfind(p53nt.Sequence,sc(i:i+3))

code(j)=k(randi([1 length(k)]));
j=j+1;
end


fileID = fopen('Ciphertext.txt','w');
for (i=1:length(code))
fprintf(fileID,'%d ',code(i))
end

Create Environment and configure Tensorflow

Hi All,
We can configure Environment in Python and Configure Tensorflow using the below given statements.

1. install python
2. install virtual environment
pip install virtualenv
3. Create a floder c:\HUP
4. create virtual environment
python -m virtualenv c:\HUP
5. Activate virtual environment
c:\HUP\Scripts\activate

pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl