| Compid documentation

# Manual Query

Compid's internal database can be queried manually by using SQL query language. See sentences with which the database was created here.

The following example query retrieves all peptides associated with a protein having an accession `gi|62897597` throughout the datasets. Dataset names, scan titles and peptide sequences are included in the resulting table.

`SELECT DATASETINFO.DSNAME, QUERY.SCANTITLE, PEPTIDE.PEPSEQUENCE
FROM PROTEIN, PROTEINHIT, PROTPEPTHITSJOIN, PEPTIDEHIT, PEPTIDE, QUERY, DATASETINFO
WHERE PROTEIN.ACCESSION = 'gi|62897597'
AND PROTEIN.PROTEIN_ID = PROTEINHIT.PROTEIN_ID
AND PROTEINHIT.PROTEINHIT_ID = PROTPEPTHITSJOIN.PROTEINHIT_ID
AND PEPTIDEHIT.PEPTIDEHIT_ID = PROTPEPTHITSJOIN.PEPTIDEHIT_ID
AND PEPTIDE.PEPTIDE_ID = PEPTIDEHIT.PEPTIDE_ID
AND QUERY.QUERY_ID = PEPTIDEHIT.QUERY_ID
AND DATASETINFO.DATASETINFO_ID = QUERY.DATASETINFO_ID`