I tried this command and all the files go to haveNoChr.txt which is not correct as i have files with header (first line) as below: A few examples is as follows:
>NZ_LS483492.1 Serratia rubidaea strain NCTC10848 genome assembly, chromosome: 1
>NC_013791.2 Bacillus pseudofirmus OF4, complete genome
>NZ_CP016324.1 Vibrio cholerae 2740-80 chromosome 1, complete sequence
I have gone through the whole file in second example and i didn't see any line starting with '>' which includes 'chromosome'. I am not sure why this one-liner doesn't separate at least this file in a haveNOchr.txt
If you want to get faster/better/more accurate answers it would really help if you show some examples of your data, and how these have to be "parsed".
I’m not sure what the aim of filtering the genomes is by the word chromosome is exactly?
To my knowledge the work chromosome in the header doesn’t tell you anything about that assembly specifically.
Assuming that fasta is linearized (i.e sequence is in single line, after header):
should give you all the fasta sequences with no chromosome in header.
should give you all the fasta sequences with chromosome in header.