Please fix this code

조회 수: 1 (최근 30일)
Ahmad
Ahmad 2015년 1월 5일
답변: Luuk van Oosten 2015년 1월 7일
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