Open sneumann opened 8 years ago
The relevant changes are in 7dd534e388083a62a85346384d0e048aff358453 and c8aa7079b2b07e839802914c4f960f545f59b343 in my repository.
Crontab job should not run by root. I suggest to use the default owner of the MassBank folder. A better place for the scripts (than /vagrant) might be also be found. Not everyone wants to use a pre-compiled box.
We create a file called statistics.csv; which could be downloaded by the users. I suggest to wait until @schymane finished her new scripts for extraction and listing of record content or implement a service after refactorising of the DB model #9
schymane has a function that currently works well on a select set of "default" columns. I'd like to add extra use cases, i.e. ALL columns, or specific queries (e.g. RT-based entries, structures only etc etc). @tsufz can you get me a list of ALL MassBank fields that we may have to cover? Then I can at least do the "all" case and we can work on fine tuning later?
Default setting is: field_codes <- c("ACCESSION", "CH$NAME", "CH$SMILES", "CH$EXACT_MASS", "CH$FORMULA", "CH$IUPAC", "CH$LINK: CAS", "CH$LINK: PUBCHEM CID", "CH$LINK: INCHIKEY", "CH$LINK: CHEMSPIDER", "AC$MASS_SPECTROMETRY: COLLISION_ENERGY", "AC$MASS_SPECTROMETRY: FRAGMENTATION_MODE", "AC$CHROMATOGRAPHY: COLUMN_NAME", "AC$CHROMATOGRAPHY: RETENTION_TIME", "MS$FOCUSED_ION: PRECURSOR_M/Z", "MS$FOCUSED_ION: PRECURSOR_TYPE")
Run the getInfo.R from https://github.com/MassBank/MassBankAdministrationScripts/tree/master/R%20projects/MBrecordToFile as regular cron job. Output the result under some static *.CSV URL, e.g. http://massbank.eu/MassBank/DB/statistics.csv
Also, from the R DataFrame in the export a HTML representation similar to http://www.massbank.jp/en/statistics.html which can then be included in dynamically in http://www.massbank.jp/en/statistics.html
This is also related to https://github.com/MassBank/MassBank-web/issues/1