That's great! I like the python version! thanks so much!
Hi,
I log in NCBI ftp server by this way:
ftp ftp.ncbi.nih.gov
And then cd to ./genomes/refseq/.I want to check how many folders/genomes are in the refeq folder, what command should I use?
I used this way to do it:
ls . list # save to local file 'list', then use wc -l to count
do you have easier way?
Thanks, Tao
2 answers
I would use a little script to handle this type of work. For example,
or the equivalent:
You can modify those to get what you need from the list.
Glad I could help. You might want to add some debugging to the python because I don't think those commands will warn if they fail. There is a lot of test statements in the perl to be safe and the python should probably also have some tests.
That's very good suggestion, thanks!
you could probably just pipe instead of saving to a local file. i.e. ls -l | wc -l
disclosure: haven't checked it for bugs or reliability
Log in to answer this question.