Please fix this code

3 visualizaciones (últimos 30 días)
Ahmad
Ahmad el 5 de En. de 2015
Respondida: Luuk van Oosten el 7 de En. de 2015
protein1=input('Please input GenPept code of the first protein: ', 's');
protein2=input('Please input GenPept code of the second protein: ', 's');
disp('Please wait, this can take a while')
for step = 1:50
fprintf('.')
end
seq1 = getgenpept('protein1','SequenceOnly',true);
seq2 = getgenpept('protein2','SequenceOnly',true);
When I input AAA69808 for protein 1, it gives error
  3 comentarios
Geoff Hayes
Geoff Hayes el 5 de En. de 2015
Ahmad - if the code is returning an error of some kind, then please copy and paste the full error message to your question. Of particular interest is the line number that generated the error.
Ahmad
Ahmad el 5 de En. de 2015
Editada: Image Analyst el 5 de En. de 2015
well it's no longer giving error!!! this is weird, I think it had to do with previous running code, is there a way to terminate all processes on MATLAB?!
btw, if i want the dots to appear more slowly in the for loop, what do I do?!
it didn't work btw
Please input GenPept code of the first protein: AAA69808
Please input GenPept code of the second protein: NP_989750
Please wait, this can take a while
..................................................Warning: The record protein1 has been replaced by NP_001069837
!!!

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 5 de En. de 2015
Editada: Image Analyst el 5 de En. de 2015
Here's some code you can run to clean things up at the beginning of a script.
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
Try putting that into a quick launch toolbar button called "Clean up" for easy single-click running of it.
  2 comentarios
Ahmad
Ahmad el 5 de En. de 2015
Editada: Image Analyst el 5 de En. de 2015
thx plz help me i continue to get this error! look at this example here:
I'm trying to take those NCBI reference codes as input from the user, this is what i wrote:
protein1=input('NCBI reference sequence of the first protein: ', 's');
protein2=input('NCBI reference sequence of the second protein: ', 's');
disp('Please wait, this can take a while')
for step = 1:100
fprintf('.')
end
seq1 = getgenpept('protein1','SequenceOnly',true);
seq2 = getgenpept('protein2','SequenceOnly',true);
but I get this "warning"
Warning: The record protein1 has been replaced by NP_001069837.
Returning record 115496762
> In bioinfo\private\getncbidata>accession2gi at 425
In bioinfo\private\getncbidata at 189
In getgenpept at 67
In Untitled at 14
Warning: The record protein2 has been replaced by NP_001098798.
Returning record 157427784
> In bioinfo\private\getncbidata>accession2gi at 425
In bioinfo\private\getncbidata at 189
In getgenpept at 67
In Untitled at 15
Image Analyst
Image Analyst el 5 de En. de 2015
Ahmad, I formatted this post for you but for the future, read this.
Sorry I can't answer because I don't have the Bioinformatics Toolbox and I don't know what those functions do.

Iniciar sesión para comentar.


Luuk van Oosten
Luuk van Oosten el 7 de En. de 2015
I believe the warning is of no importance to you. Note the difference between different protein annotations, I think that is what is confusing you. It seems that accession numbers are converted to GI nrs.
Have a look here
And here

Categorías

Más información sobre Genomics and Next Generation Sequencing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by