from : the Belgian EMBnet Node
In the meantime, I found the answer myself. The GCG procedure
MSFResetFile(File.ir) returns .true. if File is a MSF. The
procedure checks some, but not all of the features of the file.
E.g. It checks that the .. and the // are present, but not if
the checksums are correct. To have a check of the integrity of
the MSF file, there seems to be no other way than to write a long
program, as suggested by Don Gilbert.
Since it is common to give as input the name of a file that was
not the file you had in mind (and thus is not a MSF), but rare that
a MSF file is corrupted, I was satisfied with using MSFResetFile,
and used this piece of code :
integer infile
Character infName(256)
Logical msfresetfile, CLRetBool, IsMSF
...
Call OpenFile(infile, infName, 'rdb')
If (CLRetBool ('MSF')) then
if (msfresetfile(infile)) then
IsMSF = .true.
call closef(infile)
else
Call writef ('\n This is not a GCG Multiple Sequence File\n')
Call writef (' Program exiting !\n')
stop
endif
else
...
Guy Bottu