Clear Filters
Clear Filters

Error following matlab's working with genomes

2 views (last 30 days)
I tried following matlab's exapmle of how to memmorry map a genome file ( ), but am getting the foollowing error -
Array indices must be positive integers or logical values.
Error in nt2int (line 92)
seq = map((uint8(nt) + 1) - uint8('a'));
I am using 'hg38.fa' from the UCSC genome browser.
Thank you,
Walter Roberson
Walter Roberson on 12 Sep 2020
Unfortunately that is timing out for me today.

Sign in to comment.

Accepted Answer

Guy Nir
Guy Nir on 13 Sep 2020
I added a command to remove any character which is not a letter:
% Remove numbers
% Convert to integers
intData = nt2int(charData);
I think Matlab should consider adjusting some of their functions to whole-genome files (instead of whole chromosmes). Other algorithms use these numbers within the FASTA file for info about these sequences.

More Answers (0)


Find more on Genomics and Next Generation Sequencing in Help Center and File Exchange





Community Treasure Hunt

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

Start Hunting!