How to search a gene from genome using gene ID?
2 次查看(过去 30 天)
显示 更早的评论
I have saved the whole genome fasta file and the gene fasta file into a folder.
Now I want to search whether the gene is available in that genome or not and how many time if yes.
Is there any function available in matlab for this kind of application?
2 个评论
Matt C
2018-7-25
I think this can be accomplished by using the fastaread() and count() functions.
The fastaread() function accepts the name of the fasta file as an input and returns a struct containing the header information and the actual sequence in the file. Optional parameters can also be added to the function call. For instance, the function could be called like fastaread('fileName', 'IgnoreGaps', true) in order to remove the gap symbols from the sequence.
The documentation for fastaread() is found here: https://www.mathworks.com/help/bioinfo/ref/fastaread.html
The count() function accepts a string and a substring and returns how many times the substring occurs in the larger string.
The documentation for count() is found here: https://www.mathworks.com/help/matlab/ref/count.html
I think the number of occurrences of the gene in the genome could be calculated by the following pseudo-code:
% Reads the gene fasta file
geneData = fastaread('geneFileName');
% Reads the genome fasta file
genomeData = fastaread('genomeFileName');
% Counts the occurrences of the gene sequence in the genome sequence
numberOfOccurrences = count(genomeData.Sequence, geneData.Sequence);
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!