I have this array:
"AC_000006.1 Human adenovirus D"
I would like to get the letters from position 13 to the end but:
How can I convert unique(w.Hit) into a string?
You need to simply extract the string from your Array, then apply the indexing as above.
If your w.Hit is always a 1-element Array, you can get your string as x=w.Hit.
You could just do
unique(w.Hit) if that fits your usecase.
And then, when indexing from position 13 to the end, you just write:
There is no need to calculate
length(unique(w.Hit)), which does a
lot of unnecessary extra work, and will be slow.
Just to complement, since Julia 1.4 we have
(you do not need to import anything) that takes the only element of a collection and return it, throwing an exception if the collection has zero or more than one element.