Error following matlab's working with genomes
Show older comments
I tried following matlab's exapmle of how to memmorry map a genome file ( https://www.mathworks.com/help/bioinfo/examples/working-with-whole-genome-data.html ), 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,
Guy
6 Comments
Walter Roberson
on 12 Sep 2020
Give the command
dbstop if error
and run the code. When it stops, look at double(nt) . If there are any entries in it less than 97 then you would get the indexing problem.
In particular you would get the error if nt contains any capital letters.
Guy Nir
on 12 Sep 2020
Walter Roberson
on 12 Sep 2020
I cannot seem to locate a copy of hg38.fa at the moment. The primary source is in Southern California, where there are quite a lot of fires at the moment, so it would not surprise me if they temporarily shut down the servers to make it easier to filter the air.
Guy Nir
on 12 Sep 2020
Edited: Walter Roberson
on 12 Sep 2020
Walter Roberson
on 12 Sep 2020
Unfortunately that is timing out for me today.
Guy Nir
on 12 Sep 2020
Accepted Answer
More Answers (0)
Categories
Find more on Downloads 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!