[Cod-bugs] Querying for presence of diffraction data

Andrius Merkys andrius.merkys at gmail.com
Thu Feb 1 15:25:03 EET 2024


Hi Matt Goldberg,

On 2024-02-01 15:14, Goldberg, Matt (Matthew G) wrote:
> I’m not sure if this is the correct email address to send this question 
> to, but I’m wondering if there’s a way to determine whether or not there 
> is diffraction data for a given ID. I know you can go to, e.g., 
> https://www.crystallography.net/cod/2002926.hkl to get the diffraction 
> data if it exists, but I’m wondering if there’s a better way than trying 
> to obtain the diffraction data and checking if a 404 error is returned. 
> Nothing is jumping out at me in the REST API documentation to suggest 
> there would be a way to do it through there.

In COD REST API there is a query parameter, 'has_fobs', which when set 
to 1 will return only those COD entries that have diffraction data files 
(HKLs) attached.

> Is there some way to do this? If I were to use the SQL option, would 
> there be an easy way to do it that way?

You may check if 'flags' SQL column contains 'has_Fobs', viz.:

select count(*) from data where flags like "%has_Fobs%"

Hope this helps,
Andrius


-- 
Andrius Merkys
Vilnius University Institute of Biotechnology, Saulėtekio al. 7
LT-10257 Vilnius, Lithuania

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Cod-bugs mailing list