Please fix this code

1 次查看(过去 30 天)
Ahmad
Ahmad 2015-1-5
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 个评论
Geoff Hayes
Geoff Hayes 2015-1-5
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 2015-1-5
编辑:Image Analyst 2015-1-5
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
!!!

请先登录,再进行评论。

回答(2 个)

Image Analyst
Image Analyst 2015-1-5
编辑:Image Analyst 2015-1-5
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 个评论
Ahmad
Ahmad 2015-1-5
编辑:Image Analyst 2015-1-5
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 2015-1-5
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.

请先登录,再进行评论。


Luuk van Oosten
Luuk van Oosten 2015-1-7
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

类别

Help CenterFile Exchange 中查找有关 Genomics and Next Generation Sequencing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by