I have a list of files that I would like analyze. They are all named chr1.fa, chr2.fa, ... , chr22.fa, chrX.fa
I would like to store all of these filenames in an array. I know in python you can do
files = ["chr"+str(x)+".fa" for x in range(1,22)]+["chrX.fa"]
I have been having an embarrassingly difficult time trying to do the equivalent in Matlab. Otherwise, I'll have to initialize the file like:
files = {'chr1.fa','chr2.fa',...,'chr22.fa','chrX.fa'}
Which is really not ideal since I may be processing more files.
Any pointers on where I should be looking would be greatly appreciated.
Thanks!