text:
@inproceedings{las-10-sla,
 abstract = {In this paper we are introducing a framework towards the inclusion of Green IT metrics as part of service level agreements for future Grids and Clouds. As part of this effort we need to revisit Green IT metrics and proxies that we consider optimizing against in order to develop GreenIT as a Services (GaaS) that can be reused as part of a Software as a Service (SaaS) and Infrastructure Infrastructureas a service (IaaS) framework. We report on some of our ongoing efforts and demonstrate how we already achieve impact on the environment with our services.},
 address = {Boston and MA},
 author = {von Laszewski, Gregor and Wang, Lizhe},
 booktitle = {Grids and Service-Oriented Architectures for Service Level Agreements},
 day = {13~},
 editor = {Wieder and Philipp and Yahyapour and Ramin and Ziegler and Wolfgang},
 isbn = {978-1-4419-7320-7},
 location = {Banff and Canada},
 month = {October},
 pages = {77--88},
 publisher = {Springer US},
 title = {GreenIT Service Level Agreements},
 url = {https://laszewski.github.io/papers/vonLaszewski-greenit-sla.pdf},
 year = {2009}
}

license: MIT

license_type: permissive

branch_name: refs/heads/main

extension: bib


text:
package commands

import (
	"flag"
	"strings"

	"github.com/adolphlxm/atc/logs"
)

var ErrUseError = "Use atc-tool -help for a list"

var AdapterCommands = []*Command{}

func init() {
	logs.SetLogger(logs.AdapterStdout)
}

func Register(cmd *Command) {
	if cmd == nil {
		logs.Fatal("ATC command: Register command is nil")
	}
	AdapterCommands = append(AdapterCommands, cmd)
}

type Command struct {
	Run     func(cmd *Command, args []string) int
	Usage   string
	Use     string
	Options string

	Flag flag.FlagSet
}

// Name returns the command's name: the first word in the Usage line.
func (c *Command) Name() string {
	name := c.Usage
	i := strings.Index(name, " ")
	if i >= 0 {
		name = name[:i]
	}
	return name
}

branch_name: refs/heads/master

extension: go


text:
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/

%% Created for Stephan Aiche at 2014-08-28 17:13:08 +0200

%% Saved with string encoding Unicode (UTF-8)

@MISC{rdkit,
  title = {{RDK}it: Open-source cheminformatics},
  howpublished = {\url{http://www.rdkit.org}},
  note = {[Online; accessed 31-August-2018]},
  key = {RDKit, online}
}

@article{cdk,
	author = {Steinbeck, Christoph and Han, Yongquan and Kuhn, Stefan and Horlacher, Oliver and Luttmann, Edgar and Willighagen, Egon},
	title = {The Chemistry Development Kit (CDK):  An Open-Source Java Library for Chemo- and Bioinformatics},
	journal = {Journal of Chemical Information and Computer Sciences},
	volume = {43},
	number = {2},
	pages = {493-500},
	year = {2003},
	doi = {10.1021/ci025584y},
	note ={PMID: 12653513}
}

@article{rost2016openms,
  title={OpenMS: a flexible open-source software platform for mass spectrometry data analysis},
  author={R{\"o}st, Hannes L and Sachsenberg, Timo and Aiche, Stephan and Bielow, Chris and Weisser, Hendrik and Aicheler, Fabian and Andreotti, Sandro and Ehrlich, Hans-Christian and Gutenbrunner, Petra and Kenar, Erhan and others},
  journal={Nature Methods},
  volume={13},
  number={9},
  pages={741--748},
  year={2016},
  publisher={Nature Research}
}

@article{Griss2014,
	Abstract = {The HUPO Proteomics Standards Initiative (PSI) has developed several standardized data formats to facilitate data sharing in mass spectrometry (MS) based proteomics. These allow researchers to report their complete results in a unified way. However, at present, there is no format to describe the final qualitative and quantitative results for proteomics and metabolomics experiments in a simple tabular format. Many downstream analysis use cases are only concerned with the final results of an experiment and require an easily accessible format, compatible with tools like Microsoft Excel or R. We developed the mzTab file format for MS-based proteomics and metabolomics results to meet this need. mzTab is intended as a lightweight supplement to the existing standard XML-based file formats (mzML, mzIdentML, mzQuantML), providing a comprehensive summary, similar in concept to the supplementary material of a scientific publication. mzTab files can contain protein, peptide, and small molecule identifications together with experimental metadata and basic quantitative information. The format is not intended to store the complete experimental evidence but provides mechanisms to report results at different levels of detail. This ranges from a simple summary of the final results up to a representation of the results including the experimental design. This format is ideally suited to make MS-based proteomics and metabolomics results available to a wider biological community outside the field of MS. Several software tools for proteomics and metabolomics have already adapted the format as an output format. The comprehensive mzTab specification document and extensive additional documentation can be found at http://mztab.googlecode.com.},
	Author = {Griss, Johannes and Jones, Andrew R and Sachsenberg, Timo and Walzer, Mathias and Gatto, Laurent and Hartler, Jurgen and Thallinger, Gerhard G and Salek, Reza M and Steinbeck, Christoph and Neuhauser, Nadin and Cox, Jurgen and Neumann, Steffen and Fan, Jun and Reisinger, Florian and Xu, Qing-Wei and Del Toro, Noemi and Perez-Riverol, Yasset and Ghali, Fawaz and Bandeira, Nuno and Xenarios, Ioannis and Kohlbacher, Oliver and Vizcaino, Juan Antonio and Hermjakob, Henning},
	Date-Added = {2014-08-28 15:13:07 +0000},
	Date-Modified = {2014-08-28 15:13:07 +0000},
	Doi = {10.1074/mcp.O113.036681},
	Journal = {Mol Cell Proteomics},
	Journal-Full = {Molecular \& cellular proteomics : MCP},
	Keywords = {Bioinformatics software; Computational Biology; Data standards; Mass Spectrometry; Metabolomics},
	Month = {Jun},
	Pmid = {24980485},
	Pst = {aheadofprint},
	Title = {The mzTab Data Exchange Format: communicating MS-based proteomics and metabolomics experimental results to a wider audience},
	Year = {2014},
	Bdsk-Url-1 = {http://dx.doi.org/10.1074/mcp.O113.036681}}

@article{Wishart2007,
	Abstract = {The Human Metabolome Database (HMDB) is currently the most complete and comprehensive curated collection of human metabolite and human metabolism data in the world. It contains records for more than 2180 endogenous metabolites with information gathered from thousands of books, journal articles and electronic databases. In addition to its comprehensive literature-derived data, the HMDB also contains an extensive collection of experimental metabolite concentration data compiled from hundreds of mass spectra (MS) and Nuclear Magnetic resonance (NMR) metabolomic analyses performed on urine, blood and cerebrospinal fluid samples. This is further supplemented with thousands of NMR and MS spectra collected on purified, reference metabolites. Each metabolite entry in the HMDB contains an average of 90 separate data fields including a comprehensive compound description, names and synonyms, structural information, physico-chemical data, reference NMR and MS spectra, biofluid concentrations, disease associations, pathway information, enzyme data, gene sequence data, SNP and mutation data as well as extensive links to images, references and other public databases. Extensive searching, relational querying and data browsing tools are also provided. The HMDB is designed to address the broad needs of biochemists, clinical chemists, physicians, medical geneticists, nutritionists and members of the metabolomics community. The HMDB is available at: www.hmdb.ca.},
	Author = {Wishart, David S and Tzur, Dan and Knox, Craig and others},
	Date-Added = {2014-08-28 12:05:37 +0000},
	Date-Modified = {2014-08-28 12:07:58 +0000},
	Doi = {10.1093/nar/gkl923},
	Journal = {Nucleic Acids Res},
	Journal-Full = {Nucleic acids research},
	Mesh = {Databases, Factual; Humans; Internet; Mass Spectrometry; Metabolic Diseases; Metabolic Networks and Pathways; Metabolism; Nuclear Magnetic Resonance, Biomolecular; Quality Control; User-Computer Interface},
	Month = {Jan},
	Number = {Database issue},
	Pages = {D521-6},
	Pmc = {PMC1899095},
	Pmid = {17202168},
	Pst = {ppublish},
	Title = {HMDB: the Human Metabolome Database},
	Volume = {35},
	Year = {2007},
	Bdsk-Url-1 = {http://dx.doi.org/10.1093/nar/gkl923}}

@article{Wishart2009,
	Abstract = {The Human Metabolome Database (HMDB, http://www.hmdb.ca) is a richly annotated resource that is designed to address the broad needs of biochemists, clinical chemists, physicians, medical geneticists, nutritionists and members of the metabolomics community. Since its first release in 2007, the HMDB has been used to facilitate the research for nearly 100 published studies in metabolomics, clinical biochemistry and systems biology. The most recent release of HMDB (version 2.0) has been significantly expanded and enhanced over the previous release (version 1.0). In particular, the number of fully annotated metabolite entries has grown from 2180 to more than 6800 (a 300% increase), while the number of metabolites with biofluid or tissue concentration data has grown by a factor of five (from 883 to 4413). Similarly, the number of purified compounds with reference to NMR, LC-MS and GC-MS spectra has more than doubled (from 380 to more than 790 compounds). In addition to this significant expansion in database size, many new database searching tools and new data content has been added or enhanced. These include better algorithms for spectral searching and matching, more powerful chemical substructure searches, faster text searching software, as well as dedicated pathway searching tools and customized, clickable metabolic maps. Changes to the user-interface have also been implemented to accommodate future expansion and to make database navigation much easier. These improvements should make the HMDB much more useful to a much wider community of users.},
	Author = {Wishart, David S and Knox, Craig and Guo, An Chi and others},
	Date-Added = {2014-08-28 12:05:27 +0000},
	Date-Modified = {2014-08-28 12:08:13 +0000},
	Doi = {10.1093/nar/gkn810},
	Journal = {Nucleic Acids Res},
	Journal-Full = {Nucleic acids research},
	Mesh = {Databases, Factual; Humans; Magnetic Resonance Spectroscopy; Mass Spectrometry; Metabolic Networks and Pathways; Metabolome; User-Computer Interface},
	Month = {Jan},
	Number = {Database issue},
	Pages = {D603-10},
	Pmc = {PMC2686599},
	Pmid = {18953024},
	Pst = {ppublish},
	Title = {HMDB: a knowledgebase for the human metabolome},
	Volume = {37},
	Year = {2009},
	Bdsk-Url-1 = {http://dx.doi.org/10.1093/nar/gkn810}}

@article{Wishart2013,
	Abstract = {The Human Metabolome Database (HMDB) (www.hmdb.ca) is a resource dedicated to providing scientists with the most current and comprehensive coverage of the human metabolome. Since its first release in 2007, the HMDB has been used to facilitate research for nearly 1000 published studies in metabolomics, clinical biochemistry and systems biology. The most recent release of HMDB (version 3.0) has been significantly expanded and enhanced over the 2009 release (version 2.0). In particular, the number of annotated metabolite entries has grown from 6500 to more than 40,000 (a 600% increase). This enormous expansion is a result of the inclusion of both 'detected' metabolites (those with measured concentrations or experimental confirmation of their existence) and 'expected' metabolites (those for which biochemical pathways are known or human intake/exposure is frequent but the compound has yet to be detected in the body). The latest release also has greatly increased the number of metabolites with biofluid or tissue concentration data, the number of compounds with reference spectra and the number of data fields per entry. In addition to this expansion in data quantity, new database visualization tools and new data content have been added or enhanced. These include better spectral viewing tools, more powerful chemical substructure searches, an improved chemical taxonomy and better, more interactive pathway maps. This article describes these enhancements to the HMDB, which was previously featured in the 2009 NAR Database Issue. (Note to referees, HMDB 3.0 will go live on 18 September 2012.).},
	Author = {Wishart, David S and Jewison, Timothy and Guo, An Chi and Wilson, Michael and Knox, Craig and others},
	Date-Added = {2014-08-28 12:05:13 +0000},
	Date-Modified = {2014-08-28 12:08:28 +0000},
	Doi = {10.1093/nar/gks1065},
	Journal = {Nucleic Acids Res},
	Journal-Full = {Nucleic acids research},
	Mesh = {Databases, Chemical; Humans; Internet; Mass Spectrometry; Metabolome; Metabolomics; Nuclear Magnetic Resonance, Biomolecular; User-Computer Interface},
	Month = {Jan},
	Number = {Database issue},
	Pages = {D801-7},
	Pmc = {PMC3531200},
	Pmid = {23161693},
	Pst = {ppublish},
	Title = {HMDB 3.0--The Human Metabolome Database in 2013},
	Volume = {41},
	Year = {2013},
	Bdsk-Url-1 = {http://dx.doi.org/10.1093/nar/gks1065}}

@article{Geer:2004p285,
	Author = {Geer, Lewis Y and Markey, Sanford P and Kowalak, Jeffrey A and Wagner, Lukas and Xu, Ming and Maynard, Dawn M and Yang, Xiaoyu and Shi, Wenyao and Bryant, Stephen H},
	Date-Added = {2011-05-20 13:37:10 +0200},
	Date-Modified = {2011-05-20 13:40:23 +0200},
	Journal = {Journal of Proteome Research},
	Number = {5},
	Pages = {958--964},
	Title = {{Open mass spectrometry search algorithm}},
	Url = {http://pubs.acs.org/doi/abs/10.1021/pr0499491},
	Volume = {3},
	Year = {2004},
	Bdsk-Url-1 = {http://pubs.acs.org/doi/abs/10.1021/pr0499491}}

@webpage{OpenMS,
	Author = {OpenMS},
	Date-Added = {2011-04-05 14:04:21 +0200},
	Date-Modified = {2011-04-05 14:05:31 +0200},
	Title = {OpenMS home page},
	Url = {http://www.OpenMS.de},
	Bdsk-Url-1 = {http://www.OpenMS.de}}

@article{Sturm2009,
	Abstract = {{Visualization of complex mass spectrometric data sets is becoming increasingly important in proteomics and metabolomics. We present TOPPView, an integrated data visualization and analysis tool for mass spectrometric data sets. TOPPView allows the visualization and comparison of individual mass spectra, two-dimensional LC-MS data sets and their accompanying metadata. By supporting standardized XML-based data exchange formats, data import is possible from any type of mass spectrometer. The integrated analysis tools of the OpenMS Proteomics Pipeline (TOPP) allow efficient data analysis from within TOPPView through a convenient graphical user interface. TOPPView runs on all major operating systems and is available free of charge under an open-source license at http://www.openms.de.}},
	Author = {Sturm, Marc and Kohlbacher, Oliver},
	Citeulike-Article-Id = {4774841},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1021/pr900171m},
	Citeulike-Linkout-1 = {http://pubs.acs.org/doi/abs/10.1021/pr900171m},
	Citeulike-Linkout-2 = {http://view.ncbi.nlm.nih.gov/pubmed/19425593},
	Citeulike-Linkout-3 = {http://www.hubmed.org/display.cgi?uids=19425593},
	Doi = {10.1021/pr900171m},
	Issn = {1535-3893},
	Journal = {Journal of proteome research},
	Keywords = {mass-spectrometry, proteomics, software},
	Month = jul,
	Number = {7},
	Pages = {3760--3763},
	Pmid = {19425593},
	Posted-At = {2009-06-10 20:24:32},
	Priority = {2},
	Title = {{TOPPV}iew: An Open-Source Viewer for Mass Spectrometry Data},
	Url = {http://dx.doi.org/10.1021/pr900171m},
	Volume = {8},
	Year = {2009},
	Bdsk-Url-1 = {http://dx.doi.org/10.1021/pr900171m}}

@article{Sturm2008,
	Abstract = {{
                Mass spectrometry is an essential analytical technique for high-throughput analysis in proteomics and metabolomics. The development of new separation techniques, precise mass analyzers and experimental protocols is a very active field of research. This leads to more complex experimental setups yielding ever increasing amounts of data. Consequently, analysis of the data is currently often the bottleneck for experimental studies. Although software tools for many data analysis tasks are available today, they are often hard to combine with each other or not flexible enough to allow for rapid prototyping of a new analysis workflow.
                We present OpenMS, a software framework for rapid application development in mass spectrometry. OpenMS has been designed to be portable, easy-to-use and robust while offering a rich functionality ranging from basic data structures to sophisticated algorithms for data analysis. This has already been demonstrated in several studies.
                OpenMS is available under the Lesser GNU Public License (LGPL) from the project website at http://www.openms.de.
            }},
	Author = {Sturm, Marc and Bertsch, Andreas and Gr\"{o}pl, Clemens and Hildebrandt, Andreas and Hussong, Rene and Lange, Eva and Pfeifer, Nico and Schulz-Trieglaff, Ole and Zerck, Alexandra and Reinert, Knut and Kohlbacher, Oliver},
	Citeulike-Article-Id = {2600025},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1186/1471-2105-9-163},
	Citeulike-Linkout-1 = {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2311306/},
	Citeulike-Linkout-2 = {http://view.ncbi.nlm.nih.gov/pubmed/18366760},
	Citeulike-Linkout-3 = {http://www.hubmed.org/display.cgi?uids=18366760},
	Doi = {10.1186/1471-2105-9-163},
	Issn = {1471-2105},
	Journal = {BMC bioinformatics},
	Keywords = {openms},
	Number = {1},
	Pmcid = {PMC2311306},
	Pmid = {18366760},
	Posted-At = {2010-01-18 09:59:30},
	Priority = {0},
	Title = {{OpenMS - an open-source software framework for mass spectrometry.}},
	Url = {http://dx.doi.org/10.1186/1471-2105-9-163},
	Volume = {9},
	Year = {2008},
	Bdsk-Url-1 = {http://dx.doi.org/10.1186/1471-2105-9-163}}

@article{Kohlbacher2007,
	Abstract = {{MOTIVATION: Experimental techniques in proteomics have seen rapid development over the last few years. Volume and complexity of the data have both been growing at a similar rate. Accordingly, data management and analysis are one of the major challenges in proteomics. Flexible algorithms are required to handle changing experimental setups and to assist in developing and validating new methods. In order to facilitate these studies, it would be desirable to have a flexible 'toolbox' of versatile and user-friendly applications allowing for rapid construction of computational workflows in proteomics. RESULTS: We describe a set of tools for proteomics data analysis-TOPP, The OpenMS Proteomics Pipeline. TOPP provides a set of computational tools which can be easily combined into analysis pipelines even by non-experts and can be used in proteomics workflows. These applications range from useful utilities (file format conversion, peak picking) over wrapper applications for known applications (e.g. Mascot) to completely new algorithmic techniques for data reduction and data analysis. We anticipate that TOPP will greatly facilitate rapid prototyping of proteomics data evaluation pipelines. As such, we describe the basic concepts and the current abilities of TOPP and illustrate these concepts in the context of two example applications: the identification of peptides from a raw dataset through database search and the complex analysis of a standard addition experiment for the absolute quantitation of biomarkers. The latter example demonstrates TOPP's ability to construct flexible analysis pipelines in support of complex experimental setups. AVAILABILITY: The TOPP components are available as open-source software under the lesser GNU public license (LGPL). Source code is available from the project website at www.OpenMS.de}},
	Address = {Simulation of Biological Systems, Eberhard Karls University T\"{u}bingen Sand 14, 72076 T\"{u}bingen, Germany. oliver.kohlbacher@uni-tuebingen.de},
	Author = {Kohlbacher, O. and Reinert, K. and Gr\"{o}pl, C. and Lange, E. and Pfeifer, N. and Schulz-Trieglaff, O. and Sturm, M.},
	Citeulike-Article-Id = {1191505},
	Citeulike-Linkout-0 = {http://view.ncbi.nlm.nih.gov/pubmed/17237091},
	Citeulike-Linkout-1 = {http://www.hubmed.org/display.cgi?uids=17237091},
	Day = {15},
	Issn = {1460-2059},
	Journal = {Bioinformatics},
	Keywords = {bioinformatic, diplomarbeit, openms, printed, topp, workflow, xml},
	Month = jan,
	Number = {2},
	Pmid = {17237091},
	Posted-At = {2007-09-15 15:54:21},
	Priority = {0},
	Title = {{TOPP--the OpenMS proteomics pipeline.}},
	Url = {http://view.ncbi.nlm.nih.gov/pubmed/17237091},
	Volume = {23},
	Year = {2007},
	Bdsk-Url-1 = {http://view.ncbi.nlm.nih.gov/pubmed/17237091}}

@article{Junker2012,
	Abstract = {{
                Mass spectrometry coupled to high-performance liquid chromatography (HPLC-MS) is evolving more quickly than ever. A wide range of different instrument types and experimental setups are commonly used. Modern instruments acquire huge amounts of data, thus requiring tools for an efficient and automated data analysis. Most existing software for analyzing HPLC-MS data is monolithic and tailored toward a specific application. A more flexible alternative consists of pipeline-based tool kits allowing the construction of custom analysis workflows from small building blocks, e.g., the Trans Proteomics Pipeline (TPP) or The OpenMS Proteomics Pipeline (TOPP). One drawback, however, is the hurdle of setting up complex workflows using command line tools. We present TOPPAS, The OpenMS Proteomics Pipeline ASsistant, a graphical user interface (GUI) for rapid composition of HPLC-MS analysis workflows. Workflow construction reduces to simple drag-and-drop of analysis tools and adding connections in between. Integration of external tools into these workflows is possible as well. Once workflows have been developed, they can be deployed in other workflow management systems or batch processing systems in a fully automated fashion. The implementation is portable and has been tested under Windows, Mac OS X, and Linux. TOPPAS is open-source software and available free of charge at http://www.OpenMS.de/TOPPAS .
            }},
	Author = {Junker, Johannes and Bielow, Chris and Bertsch, Andreas and Sturm, Marc and Reinert, Knut and Kohlbacher, Oliver},
	Booktitle = {Journal of Proteome Research},
	Citeulike-Article-Id = {10685369},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1021/pr300187f},
	Citeulike-Linkout-1 = {http://pubs.acs.org/doi/abs/10.1021/pr300187f},
	Citeulike-Linkout-2 = {http://view.ncbi.nlm.nih.gov/pubmed/22583024},
	Citeulike-Linkout-3 = {http://www.hubmed.org/display.cgi?uids=22583024},
	Day = {6},
	Doi = {10.1021/pr300187f},
	Issn = {1535-3907},
	Journal = {Journal of proteome research},
	Keywords = {proteomics, workflow},
	Month = jul,
	Number = {7},
	Pages = {3914--3920},
	Pmid = {22583024},
	Posted-At = {2012-08-25 06:02:34},
	Priority = {2},
	Publisher = {American Chemical Society},
	Title = {{TOPPAS: a graphical workflow editor for the analysis of high-throughput proteomics data.}},
	Url = {http://dx.doi.org/10.1021/pr300187f},
	Volume = {11},
	Year = {2012},
	Bdsk-Url-1 = {http://dx.doi.org/10.1021/pr300187f}}

@article{Gillet2012Targeted,
	Abstract = {{
                Most proteomic studies use liquid chromatography coupled to tandem mass spectrometry to identify and quantify the peptides generated by the proteolysis of a biological sample. However, with the current methods it remains challenging to rapidly, consistently, reproducibly, accurately, and sensitively detect and quantify large fractions of proteomes across multiple samples. Here we present a new strategy that systematically queries sample sets for the presence and quantity of essentially any protein of interest. It consists of using the information available in fragment ion spectral libraries to mine the complete fragment ion maps generated using a data-independent acquisition method. For this study, the data were acquired on a fast, high resolution quadrupole-quadrupole time-of-flight (TOF) instrument by repeatedly cycling through 32 consecutive 25-Da precursor isolation windows (swaths). This SWATH MS acquisition setup generates, in a single sample injection, time-resolved fragment ion spectra for all the analytes detectable within the 400-1200 m/z precursor range and the user-defined retention time window. We show that suitable combinations of fragment ions extracted from these data sets are sufficiently specific to confidently identify query peptides over a dynamic range of 4 orders of magnitude, even if the precursors of the queried peptides are not detectable in the survey scans. We also show that queried peptides are quantified with a consistency and accuracy comparable with that of selected reaction monitoring, the gold standard proteomic quantification method. Moreover, targeted data extraction enables ad libitum quantification refinement and dynamic extension of protein probing by iterative re-mining of the once-and-forever acquired data sets. This combination of unbiased, broad range precursor ion fragmentation and targeted data extraction alleviates most constraints of present proteomic methods and should be equally applicable to the comprehensive analysis of other classes of analytes, beyond proteomics.
            }},
	Author = {Gillet, Ludovic C. and Navarro, Pedro and Tate, Stephen and R\"{o}st, Hannes and Selevsek, Nathalie and Reiter, Lukas and Bonner, Ron and Aebersold, Ruedi},
	Citeulike-Article-Id = {10249352},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1074/mcp.O111.016717},
	Citeulike-Linkout-1 = {http://www.mcponline.org/content/early/2012/01/18/mcp.O111.016717.abstract},
	Citeulike-Linkout-2 = {http://www.mcponline.org/content/early/2012/01/18/mcp.O111.016717.full.pdf},
	Citeulike-Linkout-3 = {http://view.ncbi.nlm.nih.gov/pubmed/22261725},
	Citeulike-Linkout-4 = {http://www.hubmed.org/display.cgi?uids=22261725},
	Day = {18},
	Doi = {10.1074/mcp.O111.016717},
	Issn = {1535-9484},
	Journal = {Molecular \& Cellular Proteomics},
	Keywords = {swath},
	Month = jun,
	Number = {6},
	Pmid = {22261725},
	Posted-At = {2012-04-05 11:25:16},
	Priority = {2},
	Publisher = {American Society for Biochemistry and Molecular Biology},
	Title = {{Targeted Data Extraction of the MS/MS Spectra Generated by Data-independent Acquisition: A New Concept for Consistent and Accurate Proteome Analysis.}},
	Url = {http://dx.doi.org/10.1074/mcp.O111.016717},
	Volume = {11},
	Year = {2012},
	Bdsk-Url-1 = {http://dx.doi.org/10.1074/mcp.O111.016717}}

@article{Bertsch2011OpenMS,
	Abstract = {{Proteomics experiments based on state-of-the-art mass spectrometry produce vast amounts of data, which cannot be analyzed manually. Hence, software is needed which is able to analyze the data in an automated fashion. The need for robust and reusable software tools triggered the development of libraries implementing different algorithms for the various analysis steps. OpenMS is such a software library and provides a wealth of data structures and algorithms for the analysis of mass spectrometric data. For users unfamiliar with programming, TOPP ("The OpenMS Proteomics Pipeline") offers a wide range of already implemented tools sharing the same interface and designed for a specific analysis task each. TOPP thus makes the sophisticated algorithms of OpenMS accessible to nonprogrammers. The individual TOPP tools can be strung together into pipelines for analyzing mass spectrometry-based experiments starting from the raw output of the mass spectrometer. These analysis pipelines can be constructed using a graphical editor. Even complex analytical workflows can thus be analyzed with ease.}},
	Author = {Bertsch, Andreas and Gr\"{o}pl, Clemens and Reinert, Knut and Kohlbacher, Oliver},
	Citeulike-Article-Id = {8625576},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1007/978-1-60761-987-1_23},
	Citeulike-Linkout-1 = {http://view.ncbi.nlm.nih.gov/pubmed/21063960},
	Citeulike-Linkout-2 = {http://www.hubmed.org/display.cgi?uids=21063960},
	Doi = {10.1007/978-1-60761-987-1_23},
	Issn = {1940-6029},
	Journal = {Methods in molecular biology (Clifton, N.J.)},
	Keywords = {phd, strep},
	Pages = {353--367},
	Pmid = {21063960},
	Posted-At = {2011-08-22 12:26:38},
	Priority = {2},
	Title = {{OpenMS and TOPP: open source software for LC-MS data analysis.}},
	Url = {http://dx.doi.org/10.1007/978-1-60761-987-1_23},
	Volume = {696},
	Year = {2011},
	Bdsk-Url-1 = {http://dx.doi.org/10.1007/978-1-60761-987-1_23}}

@article{Rost2014fd,
	Author = {R{\"o}st, Hannes L and Rosenberger, George and Navarro, Pedro and Gillet, Ludovic and Miladinovic, Sasa M and Schubert, Olga T and Wolski, Witold and Ben C Collins and Malmstrom, Johan and Malmstr{\"o}m, Lars and Aebersold, Ruedi},
	Journal = {Nature Biotechnology},
	Month = mar,
	Number = {3},
	Pages = {219--223},
	Title = {{OpenSWATH enables automated, targeted analysis of data-independent acquisition MS data}},
	Volume = {32},
	Year = {2014}}

@article{Reiter2011MProphet,
	Author = {Reiter, Lukas and Rinner, Oliver and Picotti, Paola and Huttenhain, Ruth and Beck, Martin and Brusniak, Mi-Youn and Hengartner, Michael O. and Aebersold, Ruedi},
	Citeulike-Article-Id = {9039993},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1038/nmeth.1584},
	Citeulike-Linkout-1 = {http://dx.doi.org/10.1038/nmeth.1584},
	Day = {20},
	Doi = {10.1038/nmeth.1584},
	Issn = {1548-7091},
	Journal = {Nature Methods},
	Keywords = {phd, uis},
	Month = may,
	Number = {5},
	Pages = {430--435},
	Posted-At = {2011-03-22 11:20:26},
	Priority = {2},
	Publisher = {Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.},
	Title = {{mProphet: automated data processing and statistical validation for large-scale SRM experiments}},
	Url = {http://dx.doi.org/10.1038/nmeth.1584},
	Volume = {8},
	Year = {2011},
	Bdsk-Url-1 = {http://dx.doi.org/10.1038/nmeth.1584}}

@article{Deutsch2012TraMLA,
	Abstract = {{Targeted proteomics via selected reaction monitoring is a powerful mass spectrometric technique affording higher dynamic range, increased specificity and lower limits of detection than other shotgun mass spectrometry methods when applied to proteome analyses. However, it involves selective measurement of predetermined analytes, which requires more preparation in the form of selecting appropriate signatures for the proteins and peptides that are to be targeted. There is a growing number of software programs and resources for selecting optimal transitions and the instrument settings used for the detection and quantification of the targeted peptides, but the exchange of this information is hindered by a lack of a standard format. We have developed a new standardized format, called TraML, for encoding transition lists and associated metadata. In addition to introducing the TraML format, we demonstrate several implementations across the community, and provide semantic validators, extensive documentation, and multiple example instances to demonstrate correctly written documents. Widespread use of TraML will facilitate the exchange of transitions, reduce time spent handling incompatible list formats, increase the reusability of previously optimized transitions, and thus accelerate the widespread adoption of targeted proteomics via selected reaction monitoring.}},
	Author = {Deutsch, Eric W. and Chambers, Matthew and Neumann, Steffen and Levander, Fredrik and Binz, Pierre-Alain and Shofstahl, Jim and Campbell, David S. and Mendoza, Luis and Ovelleiro, David and Helsens, Kenny and Martens, Lennart and Aebersold, Ruedi and Moritz, Robert L. and Brusniak, Mi-Youn},
	Citeulike-Article-Id = {10610412},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1074/mcp.R111.015040},
	Citeulike-Linkout-1 = {http://www.mcponline.org/content/11/4/R111.015040.abstract},
	Citeulike-Linkout-2 = {http://www.mcponline.org/content/11/4/R111.015040.full.pdf},
	Citeulike-Linkout-3 = {http://www.mcponline.org/cgi/content/abstract/11/4/R111.015040},
	Citeulike-Linkout-4 = {http://view.ncbi.nlm.nih.gov/pubmed/22159873},
	Citeulike-Linkout-5 = {http://www.hubmed.org/display.cgi?uids=22159873},
	Day = {01},
	Doi = {10.1074/mcp.R111.015040},
	Issn = {1535-9484},
	Journal = {Molecular \& Cellular Proteomics},
	Keywords = {phd, swath},
	Month = apr,
	Number = {4},
	Pmid = {22159873},
	Posted-At = {2012-08-13 14:01:00},
	Priority = {2},
	Publisher = {American Society for Biochemistry and Molecular Biology},
	Title = {{TraML---A Standard Format for Exchange of Selected Reaction Monitoring Transition Lists}},
	Url = {http://dx.doi.org/10.1074/mcp.R111.015040},
	Volume = {11},
	Year = {2012},
	Bdsk-Url-1 = {http://dx.doi.org/10.1074/mcp.R111.015040}}

@article{Escher2012Using,
	Abstract = {{
                Multiple reaction monitoring (MRM) has recently become the method of choice for targeted quantitative measurement of proteins using mass spectrometry. The method, however, is limited in the number of peptides that can be measured in one run. This number can be markedly increased by scheduling the acquisition if the accurate retention time (RT) of each peptide is known. Here we present iRT, an empirically derived dimensionless peptide-specific value that allows for highly accurate RT prediction. The iRT of a peptide is a fixed number relative to a standard set of reference iRT-peptides that can be transferred across laboratories and chromatographic systems. We show that iRT facilitates the setup of multiplexed experiments with acquisition windows more than four times smaller compared to in silico RT predictions resulting in improved quantification accuracy. iRTs can be determined by any laboratory and shared transparently. The iRT concept has been implemented in Skyline, the most widely used software for MRM experiments.
                {\copyright} 2012 WILEY-VCH Verlag GmbH \& Co. KGaA, Weinheim.
            }},
	Author = {Escher, Claudia and Reiter, Lukas and MacLean, Brendan and Ossola, Reto and Herzog, Franz and Chilton, John and MacCoss, Michael J. and Rinner, Oliver},
	Citeulike-Article-Id = {10875596},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1002/pmic.201100463},
	Citeulike-Linkout-1 = {http://view.ncbi.nlm.nih.gov/pubmed/22577012},
	Citeulike-Linkout-2 = {http://www.hubmed.org/display.cgi?uids=22577012},
	Doi = {10.1002/pmic.201100463},
	Issn = {1615-9861},
	Journal = {Proteomics},
	Keywords = {phd},
	Month = apr,
	Number = {8},
	Pages = {1111--1121},
	Pmid = {22577012},
	Posted-At = {2012-09-04 12:22:26},
	Priority = {2},
	Title = {{Using iRT, a normalized retention time for more targeted measurement of peptides.}},
	Url = {http://dx.doi.org/10.1002/pmic.201100463},
	Volume = {12},
	Year = {2012},
	Bdsk-Url-1 = {http://dx.doi.org/10.1002/pmic.201100463}}

@inproceedings{KNIME,
	Author = {Michael R. Berthold and Nicolas Cebron and Fabian Dill and Thomas R. Gabriel and Tobias K\"{o}tter and Thorsten Meinl and Peter Ohl and Christoph Sieb and Kilian Thiel and Bernd Wiswedel},
	Booktitle = {Studies in Classification, Data Analysis, and Knowledge Organization (GfKL 2007)},
	Isbn = {978-3-540-78239-1},
	Issn = {1431-8814},
	Publisher = {Springer},
	Title = {{KNIME}: The {K}onstanz {I}nformation {M}iner},
	Year = {2007}}

@article{Chawade:2015,
author = {Chawade, Aakash and Sandin, Marianne and Teleman, Johan and Malmström, Johan and Levander, Fredrik},
title = {Data Processing Has Major Impact on the Outcome of Quantitative Label-Free LC-MS Analysis},
journal = {Journal of Proteome Research},
volume = {14},
number = {2},
pages = {676-687},
year = {2015},
doi = {10.1021/pr500665j},
    note ={PMID: 25407311},
URL = {
        http://dx.doi.org/10.1021/pr500665j
    },
eprint = {
        http://dx.doi.org/10.1021/pr500665j
    }
}

@article{Choi2017iPRG,
author = {Choi, Meena and Eren-Dogu, Zeynep F. and Colangelo, Christopher and Cottrell, John and Hoopmann, Michael R. and Kapp, Eugene A. and Kim, Sangtae and Lam, Henry and Neubert, Thomas A. and Palmblad, Magnus and Phinney, Brett S. and Weintraub, Susan T. and MacLean, Brendan and Vitek, Olga},
title = {{ABRF Proteome Informatics Research Group (iPRG) 2015 Study: Detection of Differentially Abundant Proteins in Label-Free Quantitative LC-MS/MS Experiments}},
doi = {10.1021/acs.jproteome.6b00881},
journal = {J. Proteome Res.},
number = {2},
pages = {945--957},
volume = {16},
year = {2017}

}

@article{Choi2014MSstats,
abstract = {Summary: MSstats is an R package for statistical relative quantification of proteins and peptides in mass spectrometry-based proteomics. Version 2.0 of MSstats supports label-free and label-based experimental workflows, and data dependent, targeted and data independent spectral acquisition. It takes as input identified and quantified spectral peaks, and outputs a list of differentially abundant peptides or proteins, or summaries of peptide or protein relative abundance. MSstats relies on a flexible family of linear mixed models.$\backslash$nAvailability: The code, the documentation, and example datasets are available open-source at www.msstats.org under the Artistic-2.0 license. The package can be downloaded from www.msstats.org or from Bioconductor www.bioconductor.org, and used in a R command line workflow. The package can also be accessed as an external tool in Skyline (Broudy et al., 2013) and used via graphical user interface.$\backslash$nContact: ovitek{\{}at{\}}purdue.edu},
author = {Choi, Meena and Chang, Ching-Yun and Clough, Timothy and Broudy, Daniel and Killeen, Trevor and MacLean, Brendan and Vitek, Olga},
doi = {10.1093/bioinformatics/btu305},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/Choi et al/Choi et al.{\_}2018{\_}MSstats an R package for statistical analysis of quantitative mass spectrometry-based proteomic experiments.pdf:pdf},
isbn = {1367-4811 (Electronic) 1367-4803 (Linking)},
issn = {1367-4803},
journal = {Bioinformatics},
number = {17},
pages = {2524--2526},
pmid = {24794931},
title = {{MSstats: an R package for statistical analysis of quantitative mass spectrometry-based proteomic experiments}},
url = {https://academic.oup.com/bioinformatics/bioinformatics/article/2748156/MSstats:},
volume = {30},
year = {2014}
}

@article{Bocker2009,
abstract = {MOTIVATION High-resolution mass spectrometry (MS) is among the most widely used technologies in metabolomics. Metabolites participate in almost all cellular processes, but most metabolites still remain uncharacterized. Determination of the sum formula is a crucial step in the identification of an unknown metabolite, as it reduces its possible structures to a hopefully manageable set. RESULTS We present a method for determining the sum formula of a metabolite solely from its mass and the natural distribution of its isotopes. Our input is a measured isotope pattern from a high resolution mass spectrometer, and we want to find those molecules that best match this pattern. Our method is computationally efficient, and results on experimental data are very promising: for orthogonal time-of-flight mass spectrometry, we correctly identify sum formulas for {\textgreater}90{\%} of the molecules, ranging in mass up to 1000 Da.},
author = {B{\"{o}}cker, Sebastian and Letzel, Matthias C. and Lipt{\'{a}}k, Zsuzsanna and Pervukhin, Anton},
doi = {10.1093/bioinformatics/btn603},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/B{\"{o}}cker et al/B{\"{o}}cker et al.{\_}2009{\_}SIRIUS Decomposing isotope patterns for metabolite identification(2).pdf:pdf},
isbn = {1460-2059 (Electronic)},
issn = {13674803},
journal = {Bioinformatics},
number = {2},
pages = {218--224},
pmid = {19015140},
title = {{SIRIUS: Decomposing isotope patterns for metabolite identification}},
volume = {25},
year = {2009}
}

@article{Duhrkop2015,
abstract = {Metabolites provide a direct functional signature of cellular state. Untargeted metabolomics experiments usually rely on tandem MS to identify the thousands of compounds in a biological sample. Today, the vast majority of metabolites remain unknown. We present a method for searching molecular structure databases using tandem MS data of small molecules. Our method computes a fragmentation tree that best explains the fragmentation spectrum of an unknown molecule. We use the fragmentation tree to predict the molecular structure fingerprint of the unknown compound using machine learning. This fingerprint is then used to search a molecular structure database such as PubChem. Our method is shown to improve on the competing methods for computational metabolite identification by a considerable margin.},
annote = {CSIFingerID
CSI: Compound Structure Identification

tandem ms -{\textgreater} fragmentation tree -{\textgreater} fingerprint -{\textgreater} seach structure database

Problem: Structure identification (without spectra library)

Solutions:
1. Simulation of mass spectra from molecule structure
2. combinarial fragmentation
3. prediction of molecular fingerprints

No stereochemical information

MKL Multiple Kernel Learning - tries to assign weights to the individual kernels (improved prediction performance) (ALIGNF Cortes et al.)

The Tool is divided into three parts. Learning phase, prediction phase {\&} scoring phase

The first one is the machine learning part were known compounds from spectral libraries were used to calculate fragmentation trees, which were then used to compete molecular properties from molecular structures (fingerprints). These were then used to train individual support vector machines for each property (using multiple kernel learning).

In the prediction phase ms/ms spectra from unknown compounds are used to find a fragmentation tree and to predict the fingerprint of the unknown molecule.Â

In the scoring phase the predicted fingerprint is compared to fingerprint of molecular structures in a structure database, searching for the best match.

----------

kernel denotes similarity measure for MS/MS or fragmentation trees -{\textgreater} weights -{\textgreater} multiple kernel learning

correcto solution 50 -{\textgreater} 66.7{\%}},
author = {D{\"{u}}hrkop, Kai and Shen, Huibin and Meusel, Marvin and Rousu, Juho and B{\"{o}}cker, Sebastian},
doi = {10.1073/pnas.1509788112},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/D{\"{u}}hrkop et al/D{\"{u}}hrkop et al.{\_}2015{\_}Searching molecular structure databases with tandem mass spectra using CSIFingerID.pdf:pdf;:Users/alka/Documents/work/paper/mendeleydesktop/D{\"{u}}hrkop et al/D{\"{u}}hrkop et al.{\_}2015{\_}Searching molecular structure databases with tandem mass spectra using CSIFingerID(2).pdf:pdf},
isbn = {0027-8424},
issn = {0027-8424},
journal = {Proc. Natl. Acad. Sci.},
keywords = {Animals,Databases,Humans,Machine Learning,Mass Spectrometry,Metabolomics,Protein},
month = {oct},
number = {41},
pages = {12580--12585},
pmid = {26392543},
title = {{Searching molecular structure databases with tandem mass spectra using CSI:FingerID}},
url = {http://www.pnas.org/content/112/41/12580.abstract http://www.pnas.org/lookup/doi/10.1073/pnas.1509788112},
volume = {112},
year = {2015}
}

@article{Bocker2016,
abstract = {BACKGROUND: Untargeted metabolomics commonly uses liquid chromatography mass spectrometry to measure abundances of metabolites; subsequent tandem mass spectrometry is used to derive information about individual compounds. One of the bottlenecks in this experimental setup is the interpretation of fragmentation spectra to accurately and efficiently identify compounds. Fragmentation trees have become a powerful tool for the interpretation of tandem mass spectrometry data of small molecules. These trees are determined from the data using combinatorial optimization, and aim at explaining the experimental data via fragmentation cascades. Fragmentation tree computation does not require spectral or structural databases. To obtain biochemically meaningful trees, one needs an elaborate optimization function (scoring).$\backslash$n$\backslash$nRESULTS: We present a new scoring for computing fragmentation trees, transforming the combinatorial optimization into a Maximum A Posteriori estimator. We demonstrate the superiority of the new scoring for two tasks: both for the de novo identification of molecular formulas of unknown compounds, and for searching a database for structurally similar compounds, our method SIRIUSÂ 3, performs significantly better than the previous version of our method, as well as other methods for this task.$\backslash$n$\backslash$nCONCLUSION: SIRIUSÂ 3 can be a part of an untargeted metabolomics workflow, allowing researchers to investigate unknowns using automated computational methods.Graphical abstractWe present a new scoring for computing fragmentation trees from tandem mass spectrometry data based on Bayesian statistics. The best scoring fragmentation tree most likely explains the molecular formula of the measured parent ion.},
annote = {Fragmenation tree computation does not require spectral or structural databases.

Use of maximum posteriori estimator instead of combinatorial optimization

Use isotope pattern to get the molecular formula of the small molecule

FT - Maximum colorful subtree problem - NP Hard problem},
author = {B{\"{o}}cker, Sebastian and D{\"{u}}hrkop, Kai},
doi = {10.1186/s13321-016-0116-8},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/B{\"{o}}cker, D{\"{u}}hrkop/B{\"{o}}cker, D{\"{u}}hrkop{\_}2016{\_}Fragmentation trees reloaded.pdf:pdf},
issn = {17582946},
journal = {J. Cheminform.},
keywords = {Computational methods,Fragmentation trees,Mass spectrometry,Metabolites,Natural products},
number = {1},
pages = {1--26},
pmid = {26839597},
publisher = {Springer International Publishing},
title = {{Fragmentation trees reloaded}},
volume = {8},
year = {2016}
}

@article{Rost2016,
author = {R{\"{o}}st, Hannes L and Sachsenberg, Timo and Aiche, Stephan and Bielow, Chris and Weisser, Hendrik and Aicheler, Fabian and Andreotti, Sandro and Ehrlich, Hans-christian and Gutenbrunner, Petra and Kenar, Erhan and Liang, Xiao and Nahnsen, Sven and Nilse, Lars and Pfeuffer, Julianus and Rosenberger, George and Rurik, Marc and Schmitt, Uwe and Veit, Johannes and Walzer, Mathias and Wojnar, David and Wolski, Witold E and Schilling, Oliver and Choudhary, Jyoti S and Malmstr{\"{o}}m, Lars and Aebersold, Ruedi and Reinert, Knut and Kohlbacher, Oliver},
doi = {10.1038/nmeth.3959},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/R{\"{o}}st et al/R{\"{o}}st et al.{\_}2016{\_}OpenMS a flexible open-source software platform for mass spectrometry data analysis.pdf:pdf},
issn = {1548-7091},
journal = {Nat. Methods},
month = {sep},
number = {9},
pages = {741--748},
title = {{OpenMS: a flexible open-source software platform for mass spectrometry data analysis}},
url = {http://www.nature.com/articles/nmeth.3959},
volume = {13},
year = {2016}
}

@article{Pfeuffer2017,
abstract = {Background: In recent years, several mass spectrometry-based omics technologies emerged to investigate qualitative and quantitative changes within thousands of biologically active components such as proteins, lipids and metabolites. The research enabled through these methods potentially contributes to the diagnosis and pathophysiology of human diseases as well as to the clarification of structures and interactions between biomolecules.},
author = {Pfeuffer, Julianus and Sachsenberg, Timo and Alka, Oliver and Walzer, Mathias and Fillbrunn, Alexander and Nilse, Lars and Schilling, Oliver and Reinert, Knut and Kohlbacher, Oliver},
doi = {10.1016/j.jbiotec.2017.05.016},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/Pfeuffer et al/Pfeuffer et al.{\_}2017{\_}OpenMS - A platform for reproducible analysis of mass spectrometry data.pdf:pdf},
issn = {18734863},
journal = {J. Biotechnol.},
keywords = {Analysis workflows,Mass spectrometry,Reproducible research,Software libraries,Tool collection},
number = {February},
pages = {142--148},
title = {{OpenMS - A platform for reproducible analysis of mass spectrometry data}},
volume = {261},
year = {2017}
}

@article{Plubell2017,
abstract = {The lack of high-throughput methods to analyze the adipose tissue protein composition limits our understanding of the protein networks responsible for age and diet related metabolic response. We have developed an approach using multiple-dimension liquid chromatography tandem mass spectrometry and extended multiplexing (24 biological samples) with tandem mass tags (TMT) labeling to analyze proteomes of epididymal adipose tissues isolated from mice fed either low or high fat diet for a short or a long-term, and from mice that aged on low versus high fat diets. The peripheral metabolic health (as measured by body weight, adiposity, plasma fasting glucose, insulin, triglycerides, total cholesterol levels, and glucose and insulin tolerance tests) deteriorated with diet and advancing age, with long-term high fat diet exposure being the worst. In response to short-term high fat diet, 43 proteins representing lipid metabolism (e.g. AACS, ACOX1, ACLY) and red-ox pathways (e.g. CPD2, CYP2E, SOD3) were significantly altered (FDR {\textless} 10{\%}). Long-term high fat diet significantly altered 55 proteins associated with immune response (e.g. IGTB2, IFIT3, LGALS1) and rennin angiotensin system (e.g. ENPEP, CMA1, CPA3, ANPEP). Age-related changes on low fat diet significantly altered only 18 proteins representing mainly urea cycle (e.g. OTC, ARG1, CPS1), and amino acid biosynthesis (e.g. GMT, AKR1C6). Surprisingly, high fat diet driven age-related changes culminated with alterations in 155 proteins involving primarily the urea cycle (e.g. ARG1, CPS1), immune response/complement activation (e.g. C3, C4b, C8, C9, CFB, CFH, FGA), extracellular remodeling (e.g. EFEMP1, FBN1, FBN2, LTBP4, FERMT2, ECM1, EMILIN2, ITIH3) and apoptosis (e.g. YAP1, HIP1, NDRG1, PRKCD, MUL1) pathways. Using our adipose tissue tailored approach we have identified both age-related and high fat diet specific proteomic signatures highlighting a pronounced involvement of arginine metabolism in response to advancing age, and branched chain amino acid metabolism in early response to high fat feeding. Data are available via ProteomeXchange with identifier PXD005953.},
author = {Plubell, Deanna L and Wilmarth, Phillip A and Zhao, Yuqi and Fenton, Alexandra M and Minnier, Jessica and Reddy, Ashok P and Klimek, John and Yang, Xia and David, Larry L and Pamir, Nathalie},
doi = {10.1074/mcp.M116.065524},
issn = {1535-9484},
journal = {Mol. Cell. Proteomics},
mendeley-groups = {Promotion/MSstatsTMT},
number = {5},
pages = {873--890},
pmid = {28325852},
title = {{Extended Multiplexing of Tandem Mass Tags (TMT) Labeling Reveals Age and High Fat Diet Specific Proteome Changes in Mouse Epididymal Adipose Tissue.}},
url = {http://www.ncbi.nlm.nih.gov/pubmed/28325852 http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=PMC5417827},
volume = {16},
year = {2017}
}

@article{Huang2020,
abstract = {MSstatsTMT: Protein Significance Analysis in shotgun mass spectrometry-based proteomic experiments with tandem mass tag (TMT) labeling.},
author = {Huang, T and Choi, M and Hao, S and Vitek, O},
doi = {10.18129/B9.bioc.MSstatsTMT},
journal = {},
title = {{MSstatsTMT: Protein Significance Analysis in shotgun mass spectrometry-based proteomic experiments with tandem mass tag (TMT) labeling.}},
year = {2020}
}

@article{Duhrkop2019,
author = {D{\"{u}}hrkop, Kai and Fleischauer, Markus and Ludwig, Marcus and Aksenov, Alexander A. and Melnik, Alexey V. and Meusel, Marvin and Dorrestein, Pieter C. and Rousu, Juho and B{\"{o}}cker, Sebastian},
doi = {10.1038/s41592-019-0344-8},
issn = {1548-7091},
journal = {Nat. Methods},
month = {apr},
number = {4},
pages = {299--302},
title = {{SIRIUS 4: a rapid tool for turning tandem mass spectra into metabolite structure information}},
url = {http://www.nature.com/articles/s41592-019-0344-8},
volume = {16},
year = {2019}
}

@article{Scheubert2017,
abstract = {{\textcopyright} 2017 The Author(s). The annotation of small molecules in untargeted mass spectrometry relies on the matching of fragment spectra to reference library spectra. While various spectrum-spectrum match scores exist, the field lacks statistical methods for estimating the false discovery rates (FDR) of these annotations. We present empirical Bayes and target-decoy based methods to estimate the false discovery rate (FDR) for 70 public metabolomics data sets. We show that the spectral matching settings need to be adjusted for each project. By adjusting the scoring parameters and thresholds, the number of annotations rose, on average, by +139{\%} (ranging from -92 up to +5705{\%}) when compared with a default parameter set available at GNPS. The FDR estimation methods presented will enable a user to assess the scoring criteria for large scale analysis of mass spectrometry based metabolomics data that has been essential in the advancement of proteomics, transcriptomics, and genomics science.},
author = {Scheubert, Kerstin and Hufsky, Franziska and Petras, Daniel and Wang, Mingxun and Nothias, Louis F{\'{e}}lix and D{\"{u}}hrkop, Kai and Bandeira, Nuno and Dorrestein, Pieter C. and B{\"{o}}cker, Sebastian},
doi = {10.1038/s41467-017-01318-5},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/Scheubert et al/Scheubert et al.{\_}2017{\_}Significance estimation for large scale metabolomics annotations by spectral matching.pdf:pdf},
issn = {20411723},
journal = {Nat. Commun.},
number = {1},
publisher = {Springer US},
title = {{Significance estimation for large scale metabolomics annotations by spectral matching}},
url = {http://dx.doi.org/10.1038/s41467-017-01318-5},
volume = {8},
year = {2017}
}

@article{Teleman2015,
abstract = {MOTIVATION:Data independent acquisition mass spectrometry has emerged as a reproducible and sensitive alternative in quantitative proteomics, where parsing the highly complex tandem mass spectra requires dedicated algorithms. Recently, targeted data extraction was proposed as a novel analysis strategy for this type of data, but it is important to further develop these concepts to provide quality-controlled, interference-adjusted and sensitive peptide quantification.$\backslash$n$\backslash$nRESULTS:We here present the algorithm DIANA and the classifier PyProphet, which are based on new probabilistic sub-scores to classify the chromatographic peaks in targeted data-independent acquisition data analysis. The algorithm is capable of providing accurate quantitative values and increased recall at a controlled false discovery rate, in a complex gold standard dataset. Importantly, we further demonstrate increased confidence gained by the use of two complementary data-independent acquisition targeted analysis algorithms, as well as increased numbers of quantified peptide precursors in complex biological samples. Availability and implementation: DIANA is implemented in scala and python and available as open source (Apache 2.0 license) or pre-compiled binaries from http://quantitativeproteomics.org/diana. PyProphet can be installed from PyPi (https://pypi.python.org/pypi/pyprophet). Supplementary information: Supplementary data are available at Bioinformatics online.},
archivePrefix = {arXiv},
arxivId = {physics/9808008},
author = {Teleman, Johan and R{\"{o}}st, Hannes L. and Rosenberger, George and Schmitt, Uwe and Malmstr{\"{o}}m, Lars and Malmstr{\"{o}}m, Johan and Levander, Fredrik},
doi = {10.1093/bioinformatics/btu686},
eprint = {9808008},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/Teleman et al/Teleman et al.{\_}2015{\_}DIANA-algorithmic improvements for analysis of data-independent acquisition MS data.pdf:pdf},
isbn = {1367-4811 (Electronic)$\backslash$r1367-4803 (Linking)},
issn = {14602059},
journal = {Bioinformatics},
number = {4},
pages = {555--562},
pmid = {25348213},
primaryClass = {physics},
title = {{DIANA-algorithmic improvements for analysis of data-independent acquisition MS data}},
volume = {31},
year = {2015}
}

@article{Rost2014,
abstract = {... Journal name: Nature Biotechnology Volume: 32, Pages: 219–223 Year published: (2014) DOI: doi: 10.1038 / nbt . 2841 Published online 10 March 2014 ...  },
annote = {- automated, high throughput

Potential Advantages:
Continuous in time and fragmention intensity
-{\textgreater} complete two-dimensional recod of the fragment ion signal of all precursors generated from a file.

1) Data conversion
2) RT alignment
3) Chromatogram extraction
4) Peak-group scoring (positions in chrom - coelution of fragment traces)
5) Statistics},
author = {R{\"{o}}st, Hannes L and Rosenberger, George and Navarro, Pedro and Gillet, Ludovic and Miladinovi{\'{c}}, Sa{\v{s}}a M and Schubert, Olga T and Wolski, Witold and Collins, Ben C and Malmstr{\"{o}}m, Johan and Malmstr{\"{o}}m, Lars and Aebersold, Ruedi},
doi = {10.1038/nbt.2841},
file = {:Users/alka/Documents/work/paper/mendeleydesktop/R{\"{o}}st et al/R{\"{o}}st et al.{\_}2014{\_}OpenSWATH enables automated, targeted analysis of data-independent acquisition MS data.pdf:pdf},
isbn = {1087-0156},
issn = {1546-1696},
journal = {Nat. Biotechnol.},
number = {3},
pages = {219--23},
pmid = {24727770},
title = {{OpenSWATH enables automated, targeted analysis of data-independent acquisition MS data.}},
url = {http://www.ncbi.nlm.nih.gov/pubmed/24727770},
volume = {32},
year = {2014}
}

@ARTICLE{Elias2007,
  title    = "Target-decoy search strategy for increased confidence in
              large-scale protein identifications by mass spectrometry",
  author   = "Elias, Joshua E and Gygi, Steven P",
  abstract = "Liquid chromatography and tandem mass spectrometry (LC-MS/MS) has
              become the preferred method for conducting large-scale surveys of
              proteomes. Automated interpretation of tandem mass spectrometry
              (MS/MS) spectra can be problematic, however, for a variety of
              reasons. As most sequence search engines return results even for
              'unmatchable' spectra, proteome researchers must devise ways to
              distinguish correct from incorrect peptide identifications. The
              target-decoy search strategy represents a straightforward and
              effective way to manage this effort. Despite the apparent
              simplicity of this method, some controversy surrounds its
              successful application. Here we clarify our preferred methodology
              by addressing four issues based on observed decoy hit
              frequencies: (i) the major assumptions made with this database
              search strategy are reasonable; (ii) concatenated target-decoy
              database searches are preferable to separate target and decoy
              database searches; (iii) the theoretical error associated with
              target-decoy false positive (FP) rate measurements can be
              estimated; and (iv) alternate methods for constructing decoy
              databases are similarly effective once certain considerations are
              taken into account.",
  journal  = "Nat. Methods",
  volume   =  4,
  number   =  3,
  pages    = "207--214",
  month    =  mar,
  year     =  2007,
  language = "en"
}

repository: OpenMS/Tutorials

repo_name: OpenMS/Tutorials

gha_language: TeX


text:
---
---

@article{einstein1950meaning,
  abbr={AJP},
  tag={test},
  title={The meaning of relativity},
  author={Einstein, Albert and Taub, AH},
  journal={American Journal of Physics,},
  volume={18},
  number={6},
  url={http://link.aps.org/doi/10.1103/PhysRev.47.777},
  html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777},
  pdf={example.pdf},
  pages={403--404},
  year={1950},
  publisher={American Association of Physics Teachers,}
}

@article{PhysRev.47.777,
  abbr={PhysRev},
  title={Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?},
  author={Einstein, A. and Podolsky, B. and Rosen, N.},
  journal={Phys. Rev.,},
  volume={47},
  issue={10},
  pages={777--780},
  numpages={0},
  year={1935},
  month={May},
  publisher=aps,
  doi={10.1103/PhysRev.47.777},
  url={http://link.aps.org/doi/10.1103/PhysRev.47.777},
  html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777},
  pdf={example.pdf},
  selected={true}
}

@article{einstein1905molekularkinetischen,
  title={{\"U}ber die von der molekularkinetischen Theorie der W{\"a}rme geforderte Bewegung von in ruhenden Fl{\"u}ssigkeiten suspendierten Teilchen},
  author={Einstein, A.},
  journal={Annalen der physik,},
  volume={322},
  number={8},
  pages={549--560},
  year={1905},
  url={http://link.aps.org/doi/10.1103/PhysRev.47.777},
  html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777},
  pdf={example.pdf},
  publisher={Wiley Online Library}
}

@article{einstein1905movement,
  abbr={Ann. Phys.},
  title={Un the movement of small particles suspended in statiunary liquids required by the molecular-kinetic theory 0f heat},
  author={Einstein, A.},
  journal={Ann. Phys.,},
  volume={17},
  url={http://link.aps.org/doi/10.1103/PhysRev.47.777},
  html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777},
  pdf={example.pdf},
  pages={549--560},
  year={1905}
}

@article{einstein1905electrodynamics,
  title={On the electrodynamics of moving bodies},
  author={Einstein, A.},
  year={1905},
  url={http://link.aps.org/doi/10.1103/PhysRev.47.777},
  html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777},
  pdf={example.pdf}
}

branch_name: refs/heads/dev

gha_license_id: MIT


text:
package main

import (
	"testing"

	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"

	"k8s.io/apimachinery/pkg/util/sets"

	"github.com/openshift/ci-tools/pkg/api"
	"github.com/openshift/ci-tools/pkg/api/ocpbuilddata"
	"github.com/openshift/ci-tools/pkg/config"
	"github.com/openshift/ci-tools/pkg/github"
	"github.com/openshift/ci-tools/pkg/testhelper"
)

func TestReplacer(t *testing.T) {
	majorMinor := ocpbuilddata.MajorMinor{Major: "4", Minor: "6"}
	testCases := []struct {
		name                                         string
		config                                       *api.ReleaseBuildConfiguration
		pruneUnusedReplacementsEnabled               bool
		pruneOCPBuilderReplacementsEnabled           bool
		pruneUnusedBaseImagesEnabled                 bool
		ensureCorrectPromotionDockerfile             bool
		ensureCorrectPromotionDockerfileIngoredRepos sets.Set[string]
		promotionTargetToDockerfileMapping           map[string]dockerfileLocation
		files                                        map[string][]byte
		credentials                                  *usernameToken
		expectWrite                                  bool
		epectedOpts                                  github.Opts
	}{
		// {
		// 	name: "No dockerfile, does nothing",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{}},
		// 	},
		// },
		// {
		// 	name: "Default to dockerfile",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{}},
		// 	},
		// 	files:       map[string][]byte{"Dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/repo:tag")},
		// 	expectWrite: true,
		// },
		// {
		// 	name: "Use dockerfile_literal if present",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{DockerfileLiteral: utilpointer.String("FROM registry.svc.ci.openshift.org/org/repo:tag")}}},
		// 	},
		// 	expectWrite: true,
		// },
		// {
		// 	name: "Existing base_image is not overwritten",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		InputConfiguration: api.InputConfiguration{
		// 			BaseImages: map[string]api.ImageStreamTagReference{
		// 				"org_repo_tag": {Namespace: "other_org", Name: "other_repo", Tag: "other_tag"},
		// 			},
		// 		},
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{}},
		// 	},
		// 	files:       map[string][]byte{"Dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/repo:tag")},
		// 	expectWrite: true,
		// },
		// {
		// 	name: "ContextDir is respected",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{ContextDir: "my-dir"}}},
		// 	},
		// 	files:       map[string][]byte{"my-dir/Dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/repo:tag")},
		// 	expectWrite: true,
		// },
		// {
		// 	name: "Existing replace is respected",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 			Inputs: map[string]api.ImageBuildInputs{"some-image": {As: []string{"registry.svc.ci.openshift.org/org/repo:tag"}}}}},
		// 		},
		// 	},
		// 	files: map[string][]byte{"Dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/repo:tag")},
		// },
		// {
		// 	name: "Replaces with tag",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				DockerfilePath: "dockerfile",
		// 			},
		// 		}},
		// 	},
		// 	files:       map[string][]byte{"dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/repo:tag")},
		// 	expectWrite: true,
		// },
		// {
		// 	name: "Replaces without tag",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				DockerfilePath: "dockerfile",
		// 			},
		// 		}},
		// 	},
		// 	files:       map[string][]byte{"dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/repo")},
		// 	expectWrite: true,
		// },
		// {
		// 	name: "Replaces Copy --from",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				DockerfilePath: "dockerfile",
		// 			},
		// 		}},
		// 	},
		// 	files:       map[string][]byte{"dockerfile": []byte("COPY --from=registry.svc.ci.openshift.org/org/repo")},
		// 	expectWrite: true,
		// },
		// {
		// 	name: "Different registry, does nothing",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				DockerfilePath: "dockerfile",
		// 			},
		// 		}},
		// 	},
		// 	files: map[string][]byte{"dockerfile": []byte("FROM registry.svc2.ci.openshift.org/org/repo")},
		// },
		{
			name: "Build APIs replacement is executed first",
			config: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					From: "base",
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						DockerfilePath: "dockerfile",
					},
				}},
			},
			files:       map[string][]byte{"dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/repo as repo\nFROM registry.svc.ci.openshift.org/org/repo2")},
			expectWrite: true,
		},
		// {
		// 	name: "No pruning on empty Dockerfile",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			From: "base",
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				DockerfilePath: "dockerfile",
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"builder"}},
		// 				},
		// 			},
		// 		}},
		// 	},
		// 	pruneUnusedReplacementsEnabled: true,
		// },
		// {
		// 	name: "OCP builder pruning happens",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{
		// 			Namespace: "ocp",
		// 			Tag:       "4.8",
		// 		},
		// 	},
		// 	pruneOCPBuilderReplacementsEnabled: true,
		// 	expectWrite:                        true,
		// },
		// {
		// 	name: "OCP builder pruning skips when ocp promotion is disabled",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{
		// 			Namespace: "ocp",
		// 			Tag:       "4.8",
		// 			Disabled:  true,
		// 		},
		// 	},
		// 	pruneOCPBuilderReplacementsEnabled: true,
		// 	expectWrite:                        false,
		// },
		// {
		// 	name: "OCP builder pruning skips config which does not promote to ocp",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{
		// 			Namespace: "notocp",
		// 			Tag:       "4.8",
		// 		},
		// 	},
		// 	pruneOCPBuilderReplacementsEnabled: true,
		// 	expectWrite:                        false,
		// },
		// {
		// 	name: "Dockerfile gets fixed up",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 			To: "promotionTarget",
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{Namespace: "ocp", Name: majorMinor.String()},
		// 		Metadata:               api.Metadata{Branch: "master"},
		// 	},
		// 	ensureCorrectPromotionDockerfile:   true,
		// 	promotionTargetToDockerfileMapping: map[string]dockerfileLocation{fmt.Sprintf("registry.ci.openshift.org/ocp/%s:promotionTarget", majorMinor.String()): {dockerfile: "Dockerfile.rhel"}},
		// 	expectWrite:                        true,
		// },
		// {
		// 	name: "Config for non-master branch is ignored",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 			To: "promotionTarget",
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{Namespace: "ocp", Name: majorMinor.String()},
		// 	},
		// 	ensureCorrectPromotionDockerfile:   true,
		// 	promotionTargetToDockerfileMapping: map[string]dockerfileLocation{fmt.Sprintf("registry.svc.ci.openshift.org/ocp/%s:promotionTarget", majorMinor.String()): {dockerfile: "Dockerfile.rhel"}},
		// },
		// {
		// 	name: "Dockerfile is correct, nothing to do",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				DockerfilePath: "Dockerfile.rhel",
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 			To: "promotionTarget",
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{Namespace: "ocp", Name: majorMinor.String()},
		// 		Metadata:               api.Metadata{Branch: "master"},
		// 	},
		// 	ensureCorrectPromotionDockerfile:   true,
		// 	promotionTargetToDockerfileMapping: map[string]dockerfileLocation{fmt.Sprintf("registry.svc.ci.openshift.org/ocp/%s:promotionTarget", majorMinor.String()): {dockerfile: "Dockerfile.rhel"}},
		// },
		// {
		// 	name: "Context dir gets fixed up",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				ContextDir:     "some-dir",
		// 				DockerfilePath: "Dockerfile.rhel",
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 			To: "promotionTarget",
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{Namespace: "ocp", Name: majorMinor.String()},
		// 		Metadata:               api.Metadata{Branch: "master"},
		// 	},
		// 	ensureCorrectPromotionDockerfile:   true,
		// 	promotionTargetToDockerfileMapping: map[string]dockerfileLocation{fmt.Sprintf("registry.ci.openshift.org/ocp/%s:promotionTarget", majorMinor.String()): {contextDir: "other_dir", dockerfile: "Dockerfile.rhel"}},
		// 	expectWrite:                        true,
		// },
		// {
		// 	name: "Context dir is ncorrect, but ignored",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				ContextDir:     "some-dir",
		// 				DockerfilePath: "Dockerfile.rhel",
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 			To: "promotionTarget",
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{Namespace: "ocp", Name: majorMinor.String()},
		// 		Metadata:               api.Metadata{Branch: "master", Org: "org", Repo: "repo"},
		// 	},
		// 	ensureCorrectPromotionDockerfile:             true,
		// 	ensureCorrectPromotionDockerfileIngoredRepos: sets.New[string]("org/repo"),
		// 	promotionTargetToDockerfileMapping:           map[string]dockerfileLocation{fmt.Sprintf("registry.svc.ci.openshift.org/ocp/%s:promotionTarget", majorMinor.String()): {contextDir: "other_dir", dockerfile: "Dockerfile.rhel"}},
		// },
		// {
		// 	name: "Dockerfile+Context dir is correct, nothing to do",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				ContextDir:     "some_dir",
		// 				DockerfilePath: "Dockerfile.rhel",
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 			To: "promotionTarget",
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{Namespace: "ocp", Name: majorMinor.String()},
		// 		Metadata:               api.Metadata{Branch: "master"},
		// 	},
		// 	ensureCorrectPromotionDockerfile:   true,
		// 	promotionTargetToDockerfileMapping: map[string]dockerfileLocation{fmt.Sprintf("registry.svc.ci.openshift.org/ocp/%s:promotionTarget", majorMinor.String()): {contextDir: "some_dir", dockerfile: "Dockerfile.rhel"}},
		// },
		// {
		// 	name: "Username+Password get passed on",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				ContextDir:     "some_dir",
		// 				DockerfilePath: "Dockerfile.rhel",
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"root": {As: []string{"ocp/builder:something"}},
		// 				},
		// 			},
		// 			To: "promotionTarget",
		// 		}},
		// 		PromotionConfiguration: &api.PromotionConfiguration{Namespace: "ocp", Name: majorMinor.String()},
		// 		Metadata:               api.Metadata{Branch: "master"},
		// 	},
		// 	ensureCorrectPromotionDockerfile:   true,
		// 	promotionTargetToDockerfileMapping: map[string]dockerfileLocation{fmt.Sprintf("registry.svc.ci.openshift.org/ocp/%s:promotionTarget", majorMinor.String()): {contextDir: "some_dir", dockerfile: "Dockerfile.rhel"}},
		// 	credentials:                        &usernameToken{username: "some-user", token: "some-token"},
		// 	epectedOpts:                        github.Opts{BasicAuthUser: "some-user", BasicAuthPassword: "some-token"},
		// },
		// {
		// 	name: "Unused base images are pruned",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		InputConfiguration: api.InputConfiguration{
		// 			BaseImages: map[string]api.ImageStreamTagReference{
		// 				"old_image": {
		// 					Name:      "old_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"other_old_image": {
		// 					Name:      "other_old_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"fresh_image": {
		// 					Name:      "fresh_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 			},
		// 		},
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"image": {As: []string{"org/image"}},
		// 				},
		// 			},
		// 			To: "cool_image",
		// 		}},
		// 		Tests: []api.TestStepConfiguration{{
		// 			MultiStageTestConfigurationLiteral: &api.MultiStageTestConfigurationLiteral{
		// 				Test: []api.LiteralTestStep{{
		// 					From: "fresh_image",
		// 				}},
		// 			}},
		// 		},
		// 		Metadata: api.Metadata{Branch: "master"},
		// 	},
		// 	files:                        map[string][]byte{"Dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/image as image")},
		// 	pruneUnusedBaseImagesEnabled: true,
		// 	expectWrite:                  true,
		// },
		// {
		// 	name: "Used base images not pruned",
		// 	config: &api.ReleaseBuildConfiguration{
		// 		InputConfiguration: api.InputConfiguration{
		// 			BaseImages: map[string]api.ImageStreamTagReference{
		// 				"bundle_source_image": {
		// 					Name:      "bundle_source_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"operator_bundle_image": {
		// 					Name:      "operator_bundle_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"operator_substitution_image": {
		// 					Name:      "operator_substitution_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"output_image_tag_image": {
		// 					Name:      "output_image_tag_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"pipeline_image_cache_image": {
		// 					Name:      "pipeline_image_cache_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"project_directory_image_build_image1": {
		// 					Name:      "project_directory_image_build_image1",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"project_directory_image_build_image2": {
		// 					Name:      "project_directory_image_build_image2",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"rpm_image_injection_image": {
		// 					Name:      "rpm_image_injection_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"source_step_image": {
		// 					Name:      "source_step_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 				"test_step_image": {
		// 					Name:      "test_step_image",
		// 					Namespace: "namespace",
		// 					Tag:       "test-1.0",
		// 				},
		// 			},
		// 		},
		// 		Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
		// 			ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{
		// 					"image": {As: []string{"registry.svc.ci.openshift.org/org/image"}},
		// 				},
		// 			},
		// 			To: "cool_image",
		// 		}},
		// 		Operator: &api.OperatorStepConfiguration{
		// 			Bundles: []api.Bundle{
		// 				{BaseIndex: "operator_bundle_image"},
		// 			},
		// 			Substitutions: []api.PullSpecSubstitution{
		// 				{With: "operator_substitution_image"},
		// 			},
		// 		},
		// 		RawSteps: []api.StepConfiguration{
		// 			{BundleSourceStepConfiguration: &api.BundleSourceStepConfiguration{
		// 				Substitutions: []api.PullSpecSubstitution{
		// 					{With: "bundle_source_image"},
		// 				},
		// 			}},
		// 			{OutputImageTagStepConfiguration: &api.OutputImageTagStepConfiguration{
		// 				From: "output_image_tag_image",
		// 			}},
		// 			{PipelineImageCacheStepConfiguration: &api.PipelineImageCacheStepConfiguration{
		// 				From: "pipeline_image_cache_image",
		// 			}},
		// 			{ProjectDirectoryImageBuildInputs: &api.ProjectDirectoryImageBuildInputs{
		// 				Inputs: map[string]api.ImageBuildInputs{"project_directory_image_build_image1": {As: []string{"cool-story"}}},
		// 			}},
		// 			{ProjectDirectoryImageBuildStepConfiguration: &api.ProjectDirectoryImageBuildStepConfiguration{
		// 				ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
		// 					Inputs: map[string]api.ImageBuildInputs{"project_directory_image_build_image2": {As: []string{"cool-story"}}},
		// 				},
		// 			}},
		// 			{RPMImageInjectionStepConfiguration: &api.RPMImageInjectionStepConfiguration{
		// 				From: "rpm_image_injection_image",
		// 			}},
		// 			{SourceStepConfiguration: &api.SourceStepConfiguration{
		// 				From: "source_step_image",
		// 			}},
		// 		},
		// 		Tests: []api.TestStepConfiguration{{
		// 			MultiStageTestConfigurationLiteral: &api.MultiStageTestConfigurationLiteral{
		// 				Test: []api.LiteralTestStep{{
		// 					Dependencies: []api.StepDependency{
		// 						{Name: "pipeline:test_step_image"},
		// 					},
		// 				}},
		// 			}},
		// 		},
		// 		Metadata: api.Metadata{Branch: "master"},
		// 	},
		// 	files:                        map[string][]byte{"Dockerfile": []byte("FROM registry.svc.ci.openshift.org/org/image as image")},
		// 	pruneUnusedBaseImagesEnabled: true,
		// 	expectWrite:                  false,
		// },
	}

	for _, tc := range testCases {
		tc := tc
		t.Run(tc.name, func(t *testing.T) {
			t.Parallel()

			opts, fileGetter := fakeGithubFileGetterFactory(tc.files)
			fakeWriter := &fakeWriter{}
			if err := replacer(
				fileGetter,
				fakeWriter.Write,
				tc.pruneUnusedReplacementsEnabled,
				tc.pruneOCPBuilderReplacementsEnabled,
				tc.pruneUnusedBaseImagesEnabled,
				true,
				tc.ensureCorrectPromotionDockerfile,
				tc.ensureCorrectPromotionDockerfileIngoredRepos,
				tc.promotionTargetToDockerfileMapping,
				majorMinor,
				nil,
				func(config api.ReleaseBuildConfiguration) (api.ReleaseBuildConfiguration, error) {
					return *tc.config, nil
				},
			)(tc.config, &config.Info{}); err != nil {
				t.Errorf("replacer failed: %v", err)
			}
			if (fakeWriter.data != nil) != tc.expectWrite {
				t.Fatalf("expected write: %t, got data: %s", tc.expectWrite, string(fakeWriter.data))
			}

			if !tc.expectWrite {
				return
			}

			if diff := cmp.Diff(*opts, tc.epectedOpts); diff != "" {
				t.Errorf("opts differ from expected opts: %s", diff)
			}
			testhelper.CompareWithFixture(t, fakeWriter.data)
		})
	}
}

type fakeWriter struct {
	data []byte
}

func (fw *fakeWriter) Write(data []byte) error {
	fw.data = data
	return nil
}

func fakeGithubFileGetterFactory(data map[string][]byte) (*github.Opts, func(string, string, string, ...github.Opt) github.FileGetter) {
	o := &github.Opts{}
	return o, func(_, _, _ string, opts ...github.Opt) github.FileGetter {
		for _, opt := range opts {
			opt(o)
		}
		return func(path string) ([]byte, error) {
			return data[path], nil
		}
	}
}

func TestExtractReplacementCandidatesFromDockerfile(t *testing.T) {
	testCases := []struct {
		name           string
		in             string
		expectedResult sets.Set[string]
	}{
		{
			name:           "Simple",
			in:             "FROM capetown/center:1",
			expectedResult: sets.New[string]("capetown/center:1"),
		},
		{
			name:           "Copy --from",
			in:             "FROM centos:7\nCOPY --from=builder /go/src/github.com/code-ready/crc /opt/crc",
			expectedResult: sets.New[string]("centos:7", "builder"),
		},
		{
			name: "Multiple from and copy --from",
			in: `FROM registry.svc.ci.openshift.org/openshift/release:golang-1.13 AS builder
WORKDIR /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver
COPY . .
RUN make

FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
# Get mkfs & blkid
RUN yum update -y && \
    yum install --setopt=tsflags=nodocs -y e2fsprogs xfsprogs util-linux && \
    yum clean all && rm -rf /var/cache/yum/*
COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/bin/aws-ebs-csi-driver /usr/bin/
ENTRYPOINT ["/usr/bin/aws-ebs-csi-driver"]`,
			expectedResult: sets.New[string]("registry.svc.ci.openshift.org/openshift/release:golang-1.13", "registry.svc.ci.openshift.org/openshift/origin-v4.0:base"),
		},
		{
			name: "Unrelated directives",
			in:   "RUN somestuff\n\n\n ENV var=val",
		},
		{
			name: "Defunct from",
			in:   "from\n\n",
		},
	}

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			result, err := extractReplacementCandidatesFromDockerfile([]byte(tc.in))
			if err != nil {
				t.Fatalf("error: %v", err)
			}

			if !result.Equal(tc.expectedResult) {
				t.Errorf("result does not match expected, wanted: %v, got: %v", sets.List(tc.expectedResult), sets.List(result))
			}
		})
	}
}

func TestPruneUnusedReplacements(t *testing.T) {
	testCases := []struct {
		name            string
		in              *api.ReleaseBuildConfiguration
		allSourceImages sets.Set[string]
		expected        *api.ReleaseBuildConfiguration
	}{
		{
			name: "All replacements are valid",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}},
						},
					},
				}},
			},
			allSourceImages: sets.New[string]("some-image"),
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}},
						},
					},
				}},
			},
		},
		{
			name: "One As gets removed",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image", "superfluous"}},
						},
					}},
				},
			},
			allSourceImages: sets.New[string]("some-image"),
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}},
						},
					}},
				},
			},
		},
		{
			name: "One input is empty and gets removed",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder":   {As: []string{"some-image"}},
							"architect": {As: []string{"who-needs-this"}},
						},
					}},
				},
			},
			allSourceImages: sets.New[string]("some-image"),
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}},
						},
					}},
				},
			},
		},
		{
			name: "Whole image is empty and gets removed",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}},
						},
					}},
				},
			},
			expected: &api.ReleaseBuildConfiguration{},
		},
		{
			name: "Whole image is empty but has paths directives",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}, Paths: []api.ImageSourcePath{{}}},
						},
					}},
				},
			},
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {Paths: []api.ImageSourcePath{{}}},
						},
					}},
				},
			},
		},
		{
			name: "Whole image is empty but has from",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					From: "some-where",
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}},
						},
					}},
				},
			},
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					From:                             "some-where",
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{}},
				},
			},
		},
		{
			name: "Whole image is empty but has to",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					To: "some-when",
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"builder": {As: []string{"some-image"}},
						},
					}},
				},
			},
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					To: "some-when",
				}},
			},
		},
		{
			name:            "cnc",
			allSourceImages: sets.New[string]("scratch", "centos:7", "builder"),
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					From: "base",
					To:   "snc",
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						DockerfilePath: "images/openshift-ci/Dockerfile",
						Inputs: map[string]api.ImageBuildInputs{
							"root": {As: []string{"builder"}},
						},
					}},
				},
			},
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					From: "base",
					To:   "snc",
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						DockerfilePath: "images/openshift-ci/Dockerfile",
						Inputs: map[string]api.ImageBuildInputs{
							"root": {As: []string{"builder"}},
						},
					}},
				},
			},
		},
	}

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			if err := pruneUnusedReplacements(tc.in, tc.allSourceImages); err != nil {
				t.Fatalf("pruneUnusedReplacements failed: %v", err)
			}
			if diff := cmp.Diff(tc.in, tc.expected, cmpopts.EquateEmpty()); diff != "" {
				t.Errorf("result differs from expected: %s", diff)
			}
		})
	}
}

func TestPruneOCPBuilderReplacements(t *testing.T) {
	testCases := []struct {
		name     string
		in       *api.ReleaseBuildConfiguration
		expected *api.ReleaseBuildConfiguration
	}{
		{
			name: "Non-OCP builder replacement is left",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"root": {As: []string{"builder"}},
						},
					}},
				},
			},
			expected: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"root": {As: []string{"builder"}},
						},
					}},
				},
			},
		},
		{
			name: "OCP builder replacement is removed",
			in: &api.ReleaseBuildConfiguration{
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"root": {As: []string{"ocp/builder:blub"}},
						},
					}},
				},
				PromotionConfiguration: &api.PromotionConfiguration{
					Namespace: "ocp",
					Tag:       "4.8",
				},
			},
			expected: &api.ReleaseBuildConfiguration{
				PromotionConfiguration: &api.PromotionConfiguration{
					Namespace: "ocp",
					Tag:       "4.8",
				},
			},
		},
		{
			name: "OCP builder that directly references api.ci is left",
			in: &api.ReleaseBuildConfiguration{
				InputConfiguration: api.InputConfiguration{
					BaseImages: map[string]api.ImageStreamTagReference{"ocp_builder_go-1.13": {
						Namespace: "ocp",
						Name:      "builder",
						Tag:       "go-1.13",
					}},
				},
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"ocp_builder_go-1.13": {As: []string{"registry.svc.ci.openshift.org/ocp/builder:go-1.13"}},
						},
					}},
				},
			},
			expected: &api.ReleaseBuildConfiguration{
				InputConfiguration: api.InputConfiguration{
					BaseImages: map[string]api.ImageStreamTagReference{"ocp_builder_go-1.13": {
						Namespace: "ocp",
						Name:      "builder",
						Tag:       "go-1.13",
					}},
				},
				Images: []api.ProjectDirectoryImageBuildStepConfiguration{{
					ProjectDirectoryImageBuildInputs: api.ProjectDirectoryImageBuildInputs{
						Inputs: map[string]api.ImageBuildInputs{
							"ocp_builder_go-1.13": {As: []string{"registry.svc.ci.openshift.org/ocp/builder:go-1.13"}},
						},
					}},
				},
			},
		},
	}

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			if err := pruneOCPBuilderReplacements(tc.in); err != nil {
				t.Fatalf("pruning failed: %v", err)
			}

			if diff := cmp.Diff(tc.in, tc.expected); diff != "" {
				t.Errorf("actual differs from expected: %s", diff)
			}
		})
	}
}

func TestRegistryRegex(t *testing.T) {
	tests := []struct {
		name     string
		line     string
		expected string
	}{
		{
			name: "some line",
			line: "some line",
		},
		{
			name:     "api.ci registry",
			line:     "FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.7",
			expected: "registry.svc.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.7",
		},
		{
			name:     "app.ci registry",
			line:     "FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.7",
			expected: "registry.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.7",
		},
		{
			name: "need namespace",
			line: "FROM registry.ci.openshift.org/",
		},
	}

	for _, tc := range tests {
		t.Run(tc.name, func(t *testing.T) {
			actual := registryRegex.Find([]byte(tc.line))
			if diff := cmp.Diff(tc.expected, string(actual)); diff != "" {
				t.Errorf("actual does not match expected, diff: %s", diff)
			}
		})
	}
}

repository: openshift/ci-tools

repo_name: openshift/ci-tools

gha_language: Go


text:
@inproceedings{myers_verifying_2003,
 author = {Myers, Chris and Mercer, Eric and Jacobson, Hans},
 booktitle = {Formal Methods for Globally Asynchronous Locally Synchronous (GALS) Architecture},
 date = {2003-09},
 eventtitle = {Formal Methods for Globally Asynchronous Locally Synchronous (GALS) Architecture},
 file = {10.1.1.95.8983.pdf:/Users/lukas/Lab/Zotero/storage/CEPJDVAP/10.1.1.95.8983.pdf:application/pdf},
 keywords = {asynchronous circuit},
 note = {(invited paper)},
 pages = {25},
 title = {Verifying synchronization strategies}
}


text:
SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases."
DESCRIPTION = "update databases for GeoIP"

HOMEPAGE = "http://dev.maxmind.com/geoip/"
SECTION = "Development"

DEPENDS = "zlib curl"

SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.1.0/geoipupdate-2.1.0.tar.gz \
           file://GeoIP.conf \
           file://geoipupdate.cron \
          "

SRC_URI[md5sum] = "9107d082f15c8e482f4b6f1080e7deaf"
SRC_URI[sha256sum] = "7388c46f6c483ae609e5f5333a2585bc9713d56bb522da5c11b09d41c87aa5fb"

LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "\
file://ChangeLog.md;md5=25f3500fad03ad7e6bf135b29c9c7c2d \
"

inherit autotools

do_install_append() {
    install -d ${D}/${sysconfdir}
    install -d ${D}/${sysconfdir}/cron.d
    install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/
    install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/
}

branch_name: refs/heads/fido

gha_language: BitBake

extension: bb


text:
require x11-apps.inc

DESCRIPTION = "a program to test render extension implementations"

LIC_FILES_CHKSUM = "file://COPYING;md5=0672108af794b575233e866a20cb267d"

S = "${DEBIAN_UNPACK_DIR}/rendercheck"

repository: manut/meta-combo

repo_name: manut/meta-combo

branch_name: refs/heads/morty


text:
package chargify

// MetaDataEntry represents a single key/value meta data entry
type MetaDataEntry struct {
	Value      string `json:"value" mapstructure:"value"`
	ResourceID int64  `json:"resource_id" mapstructure:"resource_id"`
	Name       string `json:"name" mapstructure:"name"`
}

// MetaData represents a pageable return of a metadata request
type MetaData struct {
	TotalCount  int64           `json:"total_count" mapstructure:"total_count"`
	CurrentPage int64           `json:"current_page" mapstructure:"current_page"`
	TotalPages  int64           `json:"total_pages" mapstructure:"total_pages"`
	PerPage     int64           `json:"per_page" mapstructure:"per_page"`
	MetaData    []MetaDataEntry `json:"metadata" mapstructure:"metadata"`
}

repository: GetWagz/go-chargify

repo_name: GetWagz/go-chargify


text:
@book{adams1995hitchhiker,
  title="The Hitchhiker's Guide to the Galaxy",
  author="Adams, D.",
  isbn="9781417642595",
  url="http://books.google.com/books?id=W-xMPgAACAAJ",
  year="1995",
  publisher="San Val"
}

@article{Codishetal2000,
  author = "M. Codish and K. Marriott and C.K. Taboch",
  title = "Improving program analyses by structure untupling",
  journal = "Journal of Logic Programming",
  volume = "43",
  issue = "3",
  pages = "251--263",
  year = 2000
}

repository: qxalla/Tesis-UNAB

repo_name: qxalla/Tesis-UNAB