diff --git a/Documentation/3rd-party_support.md b/Documentation/3rd-party_support.md deleted file mode 100644 index 26d142d9..00000000 --- a/Documentation/3rd-party_support.md +++ /dev/null @@ -1,7 +0,0 @@ -# The MassBank software landscape - -Several external software are supporting access to MassBank data. -These inlude parsers to read or write the current MassBank format, -or converters between MassBank and other library formats. - - diff --git a/Documentation/AddMetaData.md b/Documentation/AddMetaData.md deleted file mode 100644 index e69de29b..00000000 diff --git a/Documentation/Validator.md b/Documentation/Validator.md deleted file mode 100644 index e69de29b..00000000 diff --git a/MassBank-Project/MassBank-lib/src/main/java/massbank/ProjectPropertiesLoader.java b/MassBank-Project/MassBank-lib/src/main/java/massbank/ProjectPropertiesLoader.java new file mode 100644 index 00000000..1ef08cd9 --- /dev/null +++ b/MassBank-Project/MassBank-lib/src/main/java/massbank/ProjectPropertiesLoader.java @@ -0,0 +1,18 @@ +package massbank; + +import java.io.IOException; +import java.util.Properties; + +public class ProjectPropertiesLoader { + + public static Properties loadProperties() { + Properties properties = new Properties(); + try { + properties.load(ProjectPropertiesLoader.class.getClassLoader().getResourceAsStream("project.properties")); + } catch (IOException e) { + e.printStackTrace(); + System.exit(1); + } + return properties; + } +} \ No newline at end of file diff --git a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/AddMetaData.java b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/AddMetaData.java index 77802630..e2f0d45a 100644 --- a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/AddMetaData.java +++ b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/AddMetaData.java @@ -1,6 +1,5 @@ package massbank.cli; -import java.io.File; import java.io.IOException; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; @@ -10,20 +9,15 @@ import java.net.URLEncoder; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; +import java.nio.file.Path; +import java.util.*; +import java.util.AbstractMap.SimpleEntry; import java.util.Map.Entry; -import java.util.Properties; -import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Matcher; import java.util.regex.Pattern; +import massbank.ProjectPropertiesLoader; import massbank.RecordParser; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.DefaultParser; @@ -31,7 +25,6 @@ import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.io.FileUtils; -import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.tuple.Pair; import org.apache.logging.log4j.LogManager; @@ -55,21 +48,18 @@ import de.undercouch.citeproc.bibtex.BibTeXConverter; import de.undercouch.citeproc.bibtex.BibTeXItemDataProvider; import io.github.dan2097.jnainchi.InchiStatus; -import io.github.dan2097.jnainchi.JnaInchi; -import massbank.PubchemResolver; import massbank.Record; -import org.petitparser.context.Result; import java.util.stream.Collectors; +import static massbank.cli.Validator.parseRecord; + /** * This class adds meta information automatically where feasible and makes some automatic fixes. Supported functions are:

- * {@link doPub}

- * {@link doName}

- * {@link doLink} - * + * * @author rmeier - * @version 27-06-2019 + * @version 29-01-2025 + * @version 29-01-2025 */ public class AddMetaData { private static final Logger logger = LogManager.getLogger(AddMetaData.class); @@ -82,7 +72,7 @@ public class AddMetaData { public static String getComptoxID(String INCHIKEY) throws JsonSyntaxException, MalformedURLException, IOException { Gson gson = new GsonBuilder().setPrettyPrinting().create(); return gson.fromJson(IOUtils.toString(new URL("https://actorws.epa.gov/actorws/chemIdentifier/v01/resolve.json?identifier=" + INCHIKEY), - Charset.forName("UTF-8")), JsonObject.class).getAsJsonObject("DataRow").getAsJsonPrimitive("dtxsid").getAsString(); + StandardCharsets.UTF_8), JsonObject.class).getAsJsonObject("DataRow").getAsJsonPrimitive("dtxsid").getAsString(); } /** @@ -96,14 +86,14 @@ public static String getChemspiderID(String INCHIKEY) throws JsonSyntaxException connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", ""); connection.setRequestProperty("apikey", CHEMSPIDER_API_KEY); - OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream(), "UTF-8"); + OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream(), StandardCharsets.UTF_8); writer.write("{\"inchikey\": \"" + INCHIKEY + "\" }"); writer.close(); - String queryID = gson.fromJson(IOUtils.toString(connection.getInputStream(), Charset.forName("UTF-8")), JsonObject.class).getAsJsonPrimitive("queryId").getAsString(); + String queryID = gson.fromJson(IOUtils.toString(connection.getInputStream(), StandardCharsets.UTF_8), JsonObject.class).getAsJsonPrimitive("queryId").getAsString(); connection.setRequestMethod("GET"); connection.setRequestProperty("Content-Type", ""); connection.setRequestProperty("apikey", CHEMSPIDER_API_KEY); - return gson.fromJson(IOUtils.toString(connection.getInputStream(), Charset.forName("UTF-8")), JsonObject.class).getAsJsonArray("results").get(0).getAsString(); + return gson.fromJson(IOUtils.toString(connection.getInputStream(), StandardCharsets.UTF_8), JsonObject.class).getAsJsonArray("results").get(0).getAsString(); } @@ -130,7 +120,7 @@ public static String doPub(Record record, String recordstring) { String formated_citation=null; try { // URL encode the doi - String EncDoi=URLEncoder.encode(doi, StandardCharsets.UTF_8.toString()); + String EncDoi=URLEncoder.encode(doi, StandardCharsets.UTF_8); URLConnection conn = new URL("https://www.doi.org/"+EncDoi).openConnection(); conn.setRequestProperty("Accept", "application/x-bibtex"); BibTeXItemDataProvider p = new BibTeXItemDataProvider(); @@ -180,13 +170,13 @@ public static String doName(Record record, String recordstring) { duplicates.add(c); } } - if (duplicates.size()>0) { + if (!duplicates.isEmpty()) { for (String d : duplicates) { // find first occurrence String fullDup = "CH$NAME: " + d + "\n"; int index = recordstring.indexOf(fullDup)+fullDup.length(); String begining = recordstring.substring(0, index); - String end = recordstring.substring(index, recordstring.length()).replace(fullDup, ""); + String end = recordstring.substring(index).replace(fullDup, ""); recordstring = begining + end; } } @@ -368,7 +358,7 @@ else if (ret == InchiStatus.ERROR) { ch_link.put("INCHIKEY", INCHIKEY); //sort ch_link=ch_link.entrySet().stream() - .sorted(Map.Entry.comparingByKey()) + .sorted(Entry.comparingByKey()) .collect(Collectors.toMap(Entry::getKey, Entry::getValue, (u, v) -> u, LinkedHashMap::new)); record.CH_LINK(ch_link); } @@ -423,7 +413,7 @@ else if (ret == InchiStatus.ERROR) { ch_link.put("INCHIKEY", INCHIKEY); //sort ch_link=ch_link.entrySet().stream() - .sorted(Map.Entry.comparingByKey()) + .sorted(Entry.comparingByKey()) .collect(Collectors.toMap(Entry::getKey, Entry::getValue, (u, v) -> u, LinkedHashMap::new)); record.CH_LINK(ch_link); } @@ -489,121 +479,95 @@ else if (ret == InchiStatus.ERROR) { public static void main(String[] arguments) throws Exception { // load version and print - final Properties properties = new Properties(); - try { - properties.load(ClassLoader.getSystemClassLoader().getResourceAsStream("project.properties")); - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } + Properties properties = ProjectPropertiesLoader.loadProperties(); System.out.println("AddMetaData version: " + properties.getProperty("version")); // parse command line - Options options = new Options(); - options.addOption("a", "all", false, "execute all operations"); - options.addOption("p", "publication", false, "format PUBLICATION tag from given DOI to follow the guidelines of ACS"); - options.addOption("n", "name", false, "fix common problems in CH$NAME tag"); - options.addOption("l", "link", false, "add links to CH$LINK tag"); - options.addOption("r", "rewrite", false, "read and rewrite the file."); - options.addOption("ms_focused_ion", false, "Inspect MS$FOCUSED_ION"); - options.addOption(null, "add-inchikey", false, "Add or fix InChIKey from the value in CH$IUPAC"); - options.addOption(null, "add-pubchemcid", false, "Add or fix PubChem CID from InChIKey and flag Problems."); - options.addOption(null, "smiles-from-inchi", false, "Set SMILES from existing InChi."); - CommandLine cmd = null; - try { - cmd = new DefaultParser().parse( options, arguments); - } - catch(ParseException e) { - // oops, something went wrong - System.err.println( "Parsing command line failed. Reason: " + e.getMessage() ); - HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("AddMetaData [OPTIONS] [ ...]", options); - System.exit(1); - } - if (cmd.getArgList().size() == 0) { - HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("AddMetaData [OPTIONS] [ ...]", options); - System.exit(1); - } - - // find all files in arguments and all *.txt files in directories and subdirectories - // specified in arguments - List recordfiles = new ArrayList<>(); - for (String argument : cmd.getArgList()) { - File argumentf = new File(argument); - if (argumentf.isFile() && FilenameUtils.getExtension(argument).equals("txt")) { - recordfiles.add(argumentf); - } else if (argumentf.isDirectory()) { - recordfiles.addAll(FileUtils.listFiles(argumentf, new String[] {"txt"}, true)); - } else { - logger.warn("Argument " + argument + " could not be processed."); - } - } - - if (recordfiles.size() == 0 ) { - logger.error("No files found."); - System.exit(1); - } - - // validate all files - logger.trace("Validating " + recordfiles.size() + " files"); + CommandLine cmd = parseCommandLine(arguments); AtomicBoolean doAddPubchemCid = new AtomicBoolean(cmd.hasOption("add-pubchemcid")); AtomicBoolean doSetSMILESfromInChi = new AtomicBoolean(cmd.hasOption("smiles-from-inchi")); - recordfiles.parallelStream().forEach(filename -> { - String recordString; - logger.info("Working on " + filename + "."); - try { - recordString = FileUtils.readFileToString(filename, StandardCharsets.UTF_8); - // read record in less strict mode - RecordParser recordparser = new RecordParser(new HashSet<>()); - Result res = recordparser.parse(recordString); - Record record = null; - if (res.isFailure()) { - System.err.println( "Parsing of \""+ filename + "\" failed. Exiting."); - System.exit(1); - } else { - record = res.get(); - } - if (record.DEPRECATED()) { - System.exit(0); - } - String recordstring2 = recordString; + List recordFiles = Validator.findRecordFiles(cmd.getArgList()); + if (recordFiles.isEmpty()) { + logger.error("No files found for validation."); + System.exit(1); + } + + RecordParser recordparser = new RecordParser(new HashSet<>()); + recordFiles.parallelStream() + .map(Validator::readFile) + .filter(Objects::nonNull) + .forEach(recordString -> { + logger.info("Working on {}.", recordString.getKey()); + Record record = parseRecord(recordString, recordparser); + if (record == null || record.DEPRECATED()) return; + + String recordStringAfterMod = recordString.getValue(); //if (cmd.hasOption("p") || cmd.hasOption("a")) recordstring2=doPub(record, recordstring2); //if (cmd.hasOption("n") || cmd.hasOption("a")) recordstring2=doName(record, recordstring2); //if (cmd.hasOption("l") || cmd.hasOption("a")) recordstring2=doLink(record); //if (cmd.hasOption("ms_focused_ion") || cmd.hasOption("a")) recordstring2=doFocusedIon(record, recordstring2); - + //if (cmd.hasOption("add-inchikey")) { // recordstring2=doAddInchikey(record); //} - + + if (doAddPubchemCid.get()) { - recordstring2=doAddPubchemCID(record); + recordStringAfterMod=doAddPubchemCID(record); } if (doSetSMILESfromInChi.get()) { - recordstring2=doSetSMILESfromInChi(record); + recordStringAfterMod=doSetSMILESfromInChi(record); } - - if (!recordString.equals(recordstring2)) { - res = recordparser.parse(recordstring2); - Record record2 =null; - if (res.isFailure()) { + + if (!recordString.getValue().equals(recordStringAfterMod)) { + Record recordAfterMod = parseRecord(new SimpleEntry<>(recordString.getKey(), recordStringAfterMod), recordparser); + + if (recordAfterMod == null) { System.err.println( "Validation of new created record file failed. Do not write."); } else { try { - FileUtils.write(filename, recordstring2, StandardCharsets.UTF_8); + FileUtils.write(recordString.getKey().toFile(), recordStringAfterMod, StandardCharsets.UTF_8); } catch(IOException exp) { - System.err.println( "Writing file \""+ filename + "\" failed. Reason: " + exp.getMessage() ); + System.err.println( "Writing file \""+ recordString.getKey() + "\" failed. Reason: " + exp.getMessage() ); System.exit(1); } } } - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - }); + }); + } + + private static CommandLine parseCommandLine(String[] arguments) { + // parse command line + Options options = new Options(); + options.addOption("a", "all", false, "execute all operations"); + options.addOption("p", "publication", false, "format PUBLICATION tag from given DOI to follow the guidelines of ACS"); + options.addOption("n", "name", false, "fix common problems in CH$NAME tag"); + options.addOption("l", "link", false, "add links to CH$LINK tag"); + options.addOption("r", "rewrite", false, "read and rewrite the file."); + options.addOption("ms_focused_ion", false, "Inspect MS$FOCUSED_ION"); + options.addOption(null, "add-inchikey", false, "Add or fix InChIKey from the value in CH$IUPAC"); + options.addOption(null, "add-pubchemcid", false, "Add or fix PubChem CID from InChIKey and flag Problems."); + options.addOption(null, "smiles-from-inchi", false, "Set SMILES from existing InChi."); + CommandLine cmd = null; + try { + cmd = new DefaultParser().parse( options, arguments); + } + catch(ParseException e) { + // oops, something went wrong + System.err.println( "Parsing command line failed. Reason: " + e.getMessage() ); + HelpFormatter formatter = new HelpFormatter(); + formatter.printHelp("AddMetaData [OPTIONS] [ ...]", options); + System.exit(1); + } + if (cmd.getArgList().isEmpty()) { + HelpFormatter formatter = new HelpFormatter(); + formatter.printHelp("AddMetaData [OPTIONS] [ ...]", options); + System.exit(1); + } + + + return cmd; } } diff --git a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Inspector.java b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Inspector.java index 76a3af77..eae5f970 100644 --- a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Inspector.java +++ b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Inspector.java @@ -20,6 +20,7 @@ ******************************************************************************/ package massbank.cli; +import massbank.ProjectPropertiesLoader; import massbank.Record; import massbank.RecordParser; import org.apache.commons.cli.*; @@ -59,13 +60,7 @@ static String getResourceFileAsString(String fileName) throws IOException { public static void main(String[] arguments) throws Exception { // load version and print - final Properties properties = new Properties(); - try { - properties.load(ClassLoader.getSystemClassLoader().getResourceAsStream("project.properties")); - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } + Properties properties = ProjectPropertiesLoader.loadProperties(); System.out.println("Inspector version: " + properties.getProperty("version")); // parse command line diff --git a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Msbnk2JSONLD.java b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Msbnk2JSONLD.java index e8de3482..f4fc286c 100644 --- a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Msbnk2JSONLD.java +++ b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Msbnk2JSONLD.java @@ -6,14 +6,13 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Properties; import java.util.Set; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.stream.Collectors; + +import massbank.ProjectPropertiesLoader; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; @@ -77,13 +76,7 @@ public static Record validate(String recordString, Set config) { public static void main(String[] arguments) { // load version and print - final Properties properties = new Properties(); - try { - properties.load(ClassLoader.getSystemClassLoader().getResourceAsStream("project.properties")); - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } + Properties properties = ProjectPropertiesLoader.loadProperties(); System.out.println("Msbnk2JSONLD version: " + properties.getProperty("version")); // parse command line diff --git a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RecordExporter.java b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RecordExporter.java index 8d4fd346..6a8d25d8 100644 --- a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RecordExporter.java +++ b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RecordExporter.java @@ -20,6 +20,7 @@ ******************************************************************************/ package massbank.cli; +import massbank.ProjectPropertiesLoader; import massbank.Record; import massbank.RecordParser; import massbank.export.RecordToJson; @@ -55,7 +56,7 @@ public class RecordExporter { public static void main(String[] arguments) { // load version and print - Properties properties = Validator.loadProperties(); + Properties properties = ProjectPropertiesLoader.loadProperties(); System.out.println("Exporter version: " + properties.getProperty("version")); // parse command line diff --git a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RefreshDatabase.java b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RefreshDatabase.java index ee2ed797..5cc6235f 100644 --- a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RefreshDatabase.java +++ b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/RefreshDatabase.java @@ -20,6 +20,7 @@ ******************************************************************************/ package massbank.cli; +import massbank.ProjectPropertiesLoader; import massbank.db.DatabaseManager; import massbank.repository.RepositoryInterface; import massbank.repository.SimpleFileRepository; @@ -48,7 +49,7 @@ public class RefreshDatabase { public static void main(String[] args) throws SQLException, IOException, ConfigurationException { // load version and print - Properties properties = Validator.loadProperties(); + Properties properties = ProjectPropertiesLoader.loadProperties(); System.out.println("RefreshDatabase version: " + properties.getProperty("version")); logger.trace("Remove all entries from database."); @@ -71,6 +72,7 @@ public static void main(String[] args) throws SQLException, IOException, Configu System.out.printf("\rProgress: %d/%d %.0f%%", progress, totalRecords, (progress * 100.0 / totalRecords)); } }); + System.out.println(); logger.info("Setting version of database to: {}.", repo.getRepoVersion()); DatabaseManager.setRepoVersion(repo.getRepoVersion()); diff --git a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Validator.java b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Validator.java index d4514ee8..3bb864b8 100644 --- a/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Validator.java +++ b/MassBank-Project/MassBank-lib/src/main/java/massbank/cli/Validator.java @@ -20,6 +20,7 @@ ******************************************************************************/ package massbank.cli; +import massbank.ProjectPropertiesLoader; import massbank.Record; import massbank.RecordParser; import massbank.RecordParserDefinition; @@ -71,7 +72,7 @@ public class Validator { public static void main(String[] arguments) throws SQLException, ConfigurationException { // load version and print - Properties properties = loadProperties(); + Properties properties = ProjectPropertiesLoader.loadProperties(); System.out.println("Validator version: " + properties.getProperty("version")); // parse command line @@ -114,22 +115,6 @@ public static void main(String[] arguments) throws SQLException, ConfigurationEx else System.exit(0); } - /** - * Reads the properties file and loads the properties. - * - * @return the loaded properties - */ - public static Properties loadProperties() { - Properties properties = new Properties(); - try { - properties.load(ClassLoader.getSystemClassLoader().getResourceAsStream("project.properties")); - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - return properties; - } - /** * Parses the command line arguments. * diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 0ed4c37e..00000000 --- a/Vagrantfile +++ /dev/null @@ -1,36 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.box = "ubuntu/bionic64" - - config.vm.provision "docker", - images: ["mariadb:latest", "tomcat:latest" , "maven:latest"] - - config.vm.synced_folder '.', '/massbank/MassBank-web' - config.vm.synced_folder '../MassBank-data', '/massbank/MassBank-data' - - config.vm.provision "shell", inline: <<-SHELL - hostnamectl set-hostname massbank - curl -s -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - chmod +x /usr/local/bin/docker-compose - cd /massbank/MassBank-web - ./install.sh start 0 - apt install apache2 -y - a2enmod ssl rewrite proxy_http - cp -r conf/apache2/* /etc/apache2/ - a2dissite 000-default - a2ensite massbank massbank-ssl - systemctl reload apache2 - SHELL - - # Create a private network, which allows host-only access to the machine - # using a specific IP. - config.vm.network "private_network", ip: "192.168.35.18" - - # Provider-specific configuration so you can fine-tune various - # backing providers for Vagrant. These expose provider-specific options. - # Example for VirtualBox: - # - config.vm.provider "virtualbox" do |vb| - vb.memory = 4096 - vb.cpus = 2 - end -end diff --git a/compose/full-service.yml b/compose/full-service.yml index 5ef0b6fb..2ce60f9a 100644 --- a/compose/full-service.yml +++ b/compose/full-service.yml @@ -1,6 +1,6 @@ services: mariadb: - image: mariadb:11 + image: mariadb:latest volumes: - $PWD/modules/sql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d environment: @@ -18,9 +18,15 @@ services: image: tomee:9-jre17-webprofile volumes: - $PWD/MassBank-Project/MassBank-web/target/MassBank.war:/usr/local/tomee/webapps/MassBank.war - - $PWD/conf/full-service.conf:/etc/massbank.conf - - $PWD/../MassBank-data:/MassBank-data + - $PWD/../MassBank-data:/MassBank-data - $PWD/compose/ServerInfo.properties:/usr/local/tomee/lib/org/apache/catalina/util/ServerInfo.properties + environment: + MASSBANK_LONG_NAME: "Personal MassBank" + MASSBANK_SITEMAP_BASE_URL: "https://msbi.ipb-halle.de/MassBank/" + MASSBANK_DB_NAME: "MassBank" + MASSBANK_DB_PASSWORD: "123blah321" + MASSBANK_DB_HOSTNAME: "mariadb" + MASSBANK_DATA_ROOT_PATH: "/MassBank-data" ports: - "808${TAG}:8080" restart: always @@ -29,8 +35,6 @@ services: condition: service_healthy #environment: #JAVA_OPTS: -Xmx4g -Xms1g - links: - - "mariadb:massbank_mariadb" maven: image: maven:3.8-eclipse-temurin-17 @@ -46,7 +50,11 @@ services: image: maven:3.8-eclipse-temurin-17 volumes: - $PWD/MassBank-Project:/project - - $PWD/conf/full-service.conf:/etc/massbank.conf - $PWD/../MassBank-data:/MassBank-data - links: - - "mariadb:massbank_mariadb" + environment: + MASSBANK_LONG_NAME: "Personal MassBank" + MASSBANK_SITEMAP_BASE_URL: "https://msbi.ipb-halle.de/MassBank/" + MASSBANK_DB_NAME: "MassBank" + MASSBANK_DB_PASSWORD: "123blah321" + MASSBANK_DB_HOSTNAME: "mariadb" + MASSBANK_DATA_ROOT_PATH: "/MassBank-data" diff --git a/conf/full-service.conf b/conf/full-service.conf deleted file mode 100644 index 3764485d..00000000 --- a/conf/full-service.conf +++ /dev/null @@ -1,7 +0,0 @@ -Name = Personal MassBank -LongName = Personal MassBank -dbName = MassBank -dbPassword = 123blah321 -dbHostName = massbank_mariadb -DataRootPath = /MassBank-data/ -SitemapBaseURL = https://msbi.ipb-halle.de/MassBank/ diff --git a/conf/massbank.conf b/conf/massbank.conf deleted file mode 100644 index 5860d3a1..00000000 --- a/conf/massbank.conf +++ /dev/null @@ -1,7 +0,0 @@ -Name = Personal MassBank -LongName = Personal MassBank -dbName = MassBank -dbPassword = 123blah321 -dbHostName = 127.0.0.1 -DataRootPath = /home/vagrant/MassBank-data/ -SitemapBaseURL = https://my-ip/MassBank/ diff --git a/modules/apache/conf/010-a2site-massbank.conf b/modules/apache/conf/010-a2site-massbank.conf deleted file mode 100644 index 704da69e..00000000 --- a/modules/apache/conf/010-a2site-massbank.conf +++ /dev/null @@ -1,36 +0,0 @@ -#*************************************************** -# For MassBank -#*************************************************** - - AllowOverride All - Options -Indexes - - - Options +ExecCGI - AddHandler cgi-script .cgi - - - Order deny,allow - Deny from all - Allow from localhost 127.0.0.1 192.168.0.0/16 - - - -JkMountCopy All - -JkMount /MassBank/jsp ajp13_worker -JkMount /MassBank/jsp/* ajp13_worker -JkMount /MassBank/temp ajp13_worker -JkMount /MassBank/temp/* ajp13_worker -JkMount /MassBank/MultiDispatcher ajp13_worker -JkMount /MassBank/MultiDispatcher/* ajp13_worker -JkMount /MassBank/MassBankEnv ajp13_worker -JkMount /MassBank/MassBankEnv/* ajp13_worker -JkMount /MassBank/mbadmin ajp13_worker -JkMount /MassBank/mbadmin/* ajp13_worker -JkMount /api ajp13_worker -JkMount /api/* ajp13_worker -JkMount /MassBank/pserver* ajp13_worker -JkMount /MassBank/ServerMonitor* ajp13_worker - - diff --git a/modules/apache/conf/config.ini.php b/modules/apache/conf/config.ini.php deleted file mode 100644 index ca37f0e1..00000000 --- a/modules/apache/conf/config.ini.php +++ /dev/null @@ -1,106 +0,0 @@ -; DO NOT REMOVE THIS LINE -; file automatically generated or modified by Piwik; you can manually override the default values in global.ini.php by redefining them in this file. -[database] -host = "127.0.0.1" -username = "bird" -password = "bird2006" -dbname = "piwikdb" -tables_prefix = "piwik_" - -[General] -salt = "f66988d59a3aee0c46fd52fabea7f56f" -trusted_hosts[] = "192.168.35.18" - -[Plugins] -Plugins[] = "CorePluginsAdmin" -Plugins[] = "CoreAdminHome" -Plugins[] = "CoreHome" -Plugins[] = "WebsiteMeasurable" -Plugins[] = "Diagnostics" -Plugins[] = "CoreVisualizations" -Plugins[] = "Proxy" -Plugins[] = "API" -Plugins[] = "LanguagesManager" -Plugins[] = "Actions" -Plugins[] = "Dashboard" -Plugins[] = "MultiSites" -Plugins[] = "DevicesDetection" -Plugins[] = "Events" -Plugins[] = "VisitsSummary" -Plugins[] = "VisitTime" -Plugins[] = "Monolog" -Plugins[] = "Login" -Plugins[] = "UsersManager" -Plugins[] = "SitesManager" -Plugins[] = "Installation" -Plugins[] = "CoreUpdater" -Plugins[] = "CoreConsole" -Plugins[] = "ScheduledReports" -Plugins[] = "PrivacyManager" -Plugins[] = "ImageGraph" -Plugins[] = "Insights" -Plugins[] = "Morpheus" -Plugins[] = "Intl" -Plugins[] = "Goals" - -[PluginsInstalled] -PluginsInstalled[] = "Diagnostics" -PluginsInstalled[] = "Login" -PluginsInstalled[] = "CoreAdminHome" -PluginsInstalled[] = "UsersManager" -PluginsInstalled[] = "SitesManager" -PluginsInstalled[] = "Installation" -PluginsInstalled[] = "Monolog" -PluginsInstalled[] = "Intl" -PluginsInstalled[] = "CorePluginsAdmin" -PluginsInstalled[] = "CoreHome" -PluginsInstalled[] = "WebsiteMeasurable" -PluginsInstalled[] = "CoreVisualizations" -PluginsInstalled[] = "Proxy" -PluginsInstalled[] = "API" -PluginsInstalled[] = "ExamplePlugin" -PluginsInstalled[] = "Widgetize" -PluginsInstalled[] = "Transitions" -PluginsInstalled[] = "LanguagesManager" -PluginsInstalled[] = "Actions" -PluginsInstalled[] = "Dashboard" -PluginsInstalled[] = "MultiSites" -PluginsInstalled[] = "Referrers" -PluginsInstalled[] = "UserLanguage" -PluginsInstalled[] = "DevicesDetection" -PluginsInstalled[] = "Goals" -PluginsInstalled[] = "Ecommerce" -PluginsInstalled[] = "SEO" -PluginsInstalled[] = "Events" -PluginsInstalled[] = "UserCountry" -PluginsInstalled[] = "VisitsSummary" -PluginsInstalled[] = "VisitFrequency" -PluginsInstalled[] = "VisitTime" -PluginsInstalled[] = "VisitorInterest" -PluginsInstalled[] = "ExampleAPI" -PluginsInstalled[] = "RssWidget" -PluginsInstalled[] = "Feedback" -PluginsInstalled[] = "CoreUpdater" -PluginsInstalled[] = "CoreConsole" -PluginsInstalled[] = "ScheduledReports" -PluginsInstalled[] = "UserCountryMap" -PluginsInstalled[] = "Live" -PluginsInstalled[] = "CustomVariables" -PluginsInstalled[] = "PrivacyManager" -PluginsInstalled[] = "ImageGraph" -PluginsInstalled[] = "Annotations" -PluginsInstalled[] = "MobileMessaging" -PluginsInstalled[] = "Overlay" -PluginsInstalled[] = "SegmentEditor" -PluginsInstalled[] = "Insights" -PluginsInstalled[] = "Morpheus" -PluginsInstalled[] = "Contents" -PluginsInstalled[] = "BulkTracking" -PluginsInstalled[] = "Resolution" -PluginsInstalled[] = "DevicePlugins" -PluginsInstalled[] = "Heartbeat" -PluginsInstalled[] = "Marketplace" -PluginsInstalled[] = "ProfessionalServices" -PluginsInstalled[] = "UserId" -PluginsInstalled[] = "CustomPiwikJs" - diff --git a/modules/apache/conf/global.ini.php b/modules/apache/conf/global.ini.php deleted file mode 100644 index ec5b56ff..00000000 --- a/modules/apache/conf/global.ini.php +++ /dev/null @@ -1,846 +0,0 @@ -; DO NOT REMOVE THIS LINE -; If you want to change some of these default values, the best practise is to override -; them in your configuration file in config/config.ini.php. If you directly edit this file, -; you will lose your changes when you upgrade Piwik. -; For example if you want to override action_title_category_delimiter, -; edit config/config.ini.php and add the following: -; [General] -; action_title_category_delimiter = "-" - -;-------- -; WARNING - YOU SHOULD NOT EDIT THIS FILE DIRECTLY - Edit config.ini.php instead. -;-------- - -[database] -host = -username = -password = -dbname = -tables_prefix = -port = 3306 -adapter = PDO\MYSQL -type = InnoDB -schema = Mysql -; if charset is set to utf8, Piwik will ensure that it is storing its data using UTF8 charset. -; it will add a sql query SET at each page view. -; Piwik should work correctly without this setting but we recommend to have a charset set. -charset = utf8 - -[database_tests] -host = localhost -username = "@USERNAME@" -password = -dbname = piwik_tests -tables_prefix = piwiktests_ -port = 3306 -adapter = PDO\MYSQL -type = InnoDB -schema = Mysql -charset = utf8 - -[tests] -; needed in order to run tests. -; if Piwik is available at http://localhost/dev/piwik/ replace @REQUEST_URI@ with /dev/piwik/ -; note: the REQUEST_URI should not contain "plugins" or "tests" in the PATH -http_host = localhost -remote_addr = "127.0.0.1" -request_uri = "@REQUEST_URI@" -port = - -; access key and secret as listed in AWS -> IAM -> Users -aws_accesskey = "" -aws_secret = "" -; key pair name as listed in AWS -> EC2 -> Key Pairs. Key name should be different per user. -aws_keyname = "" -; PEM file can be downloaded after creating a new key pair in AWS -> EC2 -> Key Pairs -aws_pem_file = "" -aws_securitygroups[] = "default" -aws_region = "us-east-1" -aws_ami = "ami-ac24bac4" -aws_instance_type = "c3.large" - -[log] -; possible values for log: screen, database, file -log_writers[] = screen - -; log level, everything logged w/ this level or one of greater severity -; will be logged. everything else will be ignored. possible values are: -; ERROR, WARN, INFO, DEBUG -log_level = WARN - -; if configured to log in a file, log entries will be made to this file -logger_file_path = tmp/logs/piwik.log - -[Cache] -; available backends are 'file', 'array', 'null', 'redis', 'chained' -; 'array' will cache data only during one request -; 'null' will not cache anything at all -; 'file' will cache on the filesystem -; 'redis' will cache on a Redis server, use this if you are running Piwik with multiple servers. Further configuration in [RedisCache] is needed -; 'chained' will chain multiple cache backends. Further configuration in [ChainedCache] is needed -backend = chained - -[ChainedCache] -; The chained cache will always try to read from the fastest backend first (the first listed one) to avoid requesting -; the same cache entry from the slowest backend multiple times in one request. -backends[] = array -backends[] = file - -[RedisCache] -; Redis server configuration. -host = "127.0.0.1" -port = 6379 -; instead of host and port a unix socket path can be configured -unix_socket = "" -timeout = 0.0 -password = "" -database = 14 -; In case you are using queued tracking: Make sure to configure a different database! Otherwise queued requests might -; be flushed - -[Debug] -; if set to 1, the archiving process will always be triggered, even if the archive has already been computed -; this is useful when making changes to the archiving code so we can force the archiving process -always_archive_data_period = 0; -always_archive_data_day = 0; -; Force archiving Custom date range (without re-archiving sub-periods used to process this date range) -always_archive_data_range = 0; - -; if set to 1, all the SQL queries will be recorded by the profiler -; and a profiling summary will be printed at the end of the request -; NOTE: you must also set [log] log_writers[] = "screen" to enable the profiler to print on screen -enable_sql_profiler = 0 - -; If set to 1, all requests to piwik.php will be forced to be 'new visitors' -tracker_always_new_visitor = 0 - -; if set to 1, all SQL queries will be logged using the DEBUG log level -log_sql_queries = 0 - -[DebugTests] -; When set to 1, standalone plugins (those with their own git repositories) -; will be loaded when executing tests. -enable_load_standalone_plugins_during_tests = 0 - -[Development] -; Enables the development mode where we avoid most caching to make sure code changes will be directly applied as -; some caches are only invalidated after an update otherwise. When enabled it'll also performs some validation checks. -; For instance if you register a method in a widget we will verify whether the method actually exists and is public. -; If not, we will show you a helpful warning to make it easy to find simple typos etc. -enabled = 0 - -; if set to 1, javascript files will be included individually and neither merged nor minified. -; this option must be set to 1 when adding, removing or modifying javascript files -; Note that for quick debugging, instead of using below setting, you can add `&disable_merged_assets=1` to the Piwik URL -disable_merged_assets = 0 - -[General] - -; the following settings control whether Unique Visitors `nb_uniq_visitors` and Unique users `nb_users` will be processed for different period types. -; year and range periods are disabled by default, to ensure optimal performance for high traffic Piwik instances -; if you set it to 1 and want the Unique Visitors to be re-processed for reports in the past, drop all piwik_archive_* tables -; it is recommended to always enable Unique Visitors and Unique Users processing for 'day' periods -enable_processing_unique_visitors_day = 1 -enable_processing_unique_visitors_week = 1 -enable_processing_unique_visitors_month = 1 -enable_processing_unique_visitors_year = 0 -enable_processing_unique_visitors_range = 0 - -; controls whether Unique Visitors will be processed for groups of websites. these metrics describe the number -; of unique visitors across the entire set of websites, so if a visitor visited two websites in the group, she -; would still only be counted as one. only relevant when using plugins that group sites together -enable_processing_unique_visitors_multiple_sites = 0 - -; The list of periods that are available in the Piwik calendar -; Example use case: custom date range requests are processed in real time, -; so they may take a few minutes on very high traffic website: you may remove "range" below to disable this period -enabled_periods_UI = "day,week,month,year,range" -enabled_periods_API = "day,week,month,year,range" - -; whether to enable subquery cache for Custom Segment archiving queries -enable_segments_subquery_cache = 0 -; Any segment subquery that matches more than segments_subquery_cache_limit IDs will not be cached, -; and the original subquery executed instead. -segments_subquery_cache_limit = 100000 -; TTL: Time to live for cache files, in seconds. Default to 60 minutes -segments_subquery_cache_ttl = 3600 - -; when set to 1, all requests to Piwik will return a maintenance message without connecting to the DB -; this is useful when upgrading using the shell command, to prevent other users from accessing the UI while Upgrade is in progress -maintenance_mode = 0 - -; Defines the release channel that shall be used. Currently available values are: -; "latest_stable", "latest_beta", "latest_2x_stable", "latest_2x_beta" -release_channel = "latest_stable" - -; character used to automatically create categories in the Actions > Pages, Outlinks and Downloads reports -; for example a URL like "example.com/blog/development/first-post" will create -; the page first-post in the subcategory development which belongs to the blog category -action_url_category_delimiter = / - -; similar to above, but this delimiter is only used for page titles in the Actions > Page titles report -action_title_category_delimiter = / - -; the maximum url category depth to track. if this is set to 2, then a url such as -; "example.com/blog/development/first-post" would be treated as "example.com/blog/development". -; this setting is used mainly to limit the amount of data that is stored by Piwik. -action_category_level_limit = 10 - -; minimum number of websites to run autocompleter -autocomplete_min_sites = 5 - -; maximum number of websites showed in search results in autocompleter -site_selector_max_sites = 15 - -; if set to 1, shows sparklines (evolution graph) in 'All Websites' report (MultiSites plugin) -show_multisites_sparklines = 1 - -; number of websites to display per page in the All Websites dashboard -all_websites_website_per_page = 50 - -; if set to 0, the anonymous user will not be able to use the 'segments' parameter in the API request -; this is useful to prevent full DB access to the anonymous user, or to limit performance usage -anonymous_user_enable_use_segments_API = 1 - -; if browser trigger archiving is disabled, API requests with a &segment= parameter will still trigger archiving. -; You can force the browser archiving to be disabled in most cases by setting this setting to 1 -; The only time that the browser will still trigger archiving is when requesting a custom date range that is not pre-processed yet -browser_archiving_disabled_enforce = 0 - -; By default, users can create Segments which are to be processed in Real-time. -; Setting this to 0 will force all newly created Custom Segments to be "Pre-processed (faster, requires archive.php cron)" -; This can be useful if you want to prevent users from adding much load on the server. -; Notes: -; * any existing Segment set to "processed in Real time", will still be set to Real-time. -; this will only affect custom segments added or modified after this setting is changed. -; * when set to 0 then any user with at least 'view' access will be able to create pre-processed segments. -enable_create_realtime_segments = 1 - -; Whether to enable the "Suggest values for segment" in the Segment Editor panel. -; Set this to 0 in case your Piwik database is very big, and suggested values may not appear in time -enable_segment_suggested_values = 1 - -; By default, any user with a "view" access for a website can create segment assigned to this website. -; Set this to "admin" or "superuser" to require that users should have at least this access to create new segments. -; Note: anonymous user (even if it has view access) is not allowed to create or edit segment. -; Possible values are "view", "admin", "superuser" -adding_segment_requires_access = "view" - -; Whether it is allowed for users to add segments that affect all websites or not. If there are many websites -; this admin option can be used to prevent users from performing an action that will have a major impact -; on Piwik performance. -allow_adding_segments_for_all_websites = 1 - -; When archiving segments for the first time, this determines the oldest date that will be archived. -; This option can be used to avoid archiving (for isntance) the lastN years for every new segment. -; Valid option values include: "beginning_of_time" (start date of archiving will not be changed) -; "segment_last_edit_time" (start date of archiving will be the earliest last edit date found, -; if none is found, the created date is used) -; "segment_creation_time" (start date of archiving will be the creation date of the segment) -; lastN where N is an integer (eg "last10" to archive for 10 days before the segment creation date) -process_new_segments_from = "beginning_of_time" - -; this action name is used when the URL ends with a slash / -; it is useful to have an actual string to write in the UI -action_default_name = index - -; default language to use in Piwik -default_language = en - -; default number of elements in the datatable -datatable_default_limit = 10 - -; Each datatable report has a Row Limit selector at the bottom right. -; By default you can select from 5 to 500 rows. You may customise the values below -; -1 will be displayed as 'all' and it will export all rows (filter_limit=-1) -datatable_row_limits = "5,10,25,50,100,250,500,-1" - -; default number of rows returned in API responses -; this value is overwritten by the '# Rows to display' selector. -; if set to -1, a click on 'Export as' will export all rows independently of the current '# Rows to display'. -API_datatable_default_limit = 100 - -; When period=range, below the datatables, when user clicks on "export", the data will be aggregate of the range. -; Here you can specify the comma separated list of formats for which the data will be exported aggregated by day -; (ie. there will be a new "date" column). For example set to: "rss,tsv,csv" -datatable_export_range_as_day = "rss" - -; This setting is overridden in the UI, under "User Settings". -; The date and period loaded by Piwik uses the defaults below. Possible values: yesterday, today. -default_day = yesterday -; Possible values: day, week, month, year. -default_period = day - -; Time in seconds after which an archive will be computed again. This setting is used only for today's statistics. -; This setting is overriden in the UI, under "General Settings". -; This setting is only used if it hasn't been overriden via the UI yet, or if enable_general_settings_admin=0 -time_before_today_archive_considered_outdated = 150 - -; This setting is overriden in the UI, under "General Settings". -; The default value is to allow browsers to trigger the Piwik archiving process. -; This setting is only used if it hasn't been overridden via the UI yet, or if enable_general_settings_admin=0 -enable_browser_archiving_triggering = 1 - -; By default, Piwik will force archiving of range periods from browser requests, even if enable_browser_archiving_triggering -; is set to 0. This can sometimes create too much of a demand on system resources. Setting this option to 0 and -; disabling browser trigger archiving will make sure ranges are not archived on browser request. Since the cron -; archiver does not archive any custom date ranges, you must either disable range (using enabled_periods_API and enabled_periods_UI) -; or make sure the date ranges users' want to see will be processed somehow. -archiving_range_force_on_browser_request = 1 - -; By default Piwik runs OPTIMIZE TABLE SQL queries to free spaces after deleting some data. -; If your Piwik tracks millions of pages, the OPTIMIZE TABLE queries might run for hours (seen in "SHOW FULL PROCESSLIST \g") -; so you can disable these special queries here: -enable_sql_optimize_queries = 1 - -; By default Piwik is purging complete date range archives to free spaces after deleting some data. -; If you are pre-processing custom ranges using CLI task to make them easily available in UI, -; you can prevent this action from happening by setting this parameter to value bigger than 1 -purge_date_range_archives_after_X_days = 1 - -; MySQL minimum required version -; note: timezone support added in 4.1.3 -minimum_mysql_version = 4.1 - -; PostgreSQL minimum required version -minimum_pgsql_version = 8.3 - -; Minimum advised memory limit in php.ini file (see memory_limit value) -; Set to "-1" to always use the configured memory_limit value in php.ini file. -minimum_memory_limit = 128 - -; Minimum memory limit enforced when archived via ./console core:archive -; Set to "-1" to always use the configured memory_limit value in php.ini file. -minimum_memory_limit_when_archiving = 768 - -; Piwik will check that usernames and password have a minimum length, and will check that characters are "allowed" -; This can be disabled, if for example you wish to import an existing User database in Piwik and your rules are less restrictive -disable_checks_usernames_attributes = 0 - -; Piwik will use the configured hash algorithm where possible. -; For legacy data, fallback or non-security scenarios, we use md5. -hash_algorithm = whirlpool - -; by default, Piwik uses PHP's built-in file-based session save handler with lock files. -; For clusters, use dbtable. -session_save_handler = files - -; If set to 1, Piwik will automatically redirect all http:// requests to https:// -; If SSL / https is not correctly configured on the server, this will break Piwik -; If you set this to 1, and your SSL configuration breaks later on, you can always edit this back to 0 -; it is recommended for security reasons to always use Piwik over https -force_ssl = 0 - -; login cookie name -login_cookie_name = piwik_auth - -; By default, the auth cookie is set only for the duration of session. -; if "Remember me" is checked, the auth cookie will be valid for 14 days by default -login_cookie_expire = 1209600 - -; The path on the server in which the cookie will be available on. -; Defaults to empty. See spec in http://curl.haxx.se/rfc/cookie_spec.html -login_cookie_path = - -; email address that appears as a Sender in the password recovery email -; if specified, {DOMAIN} will be replaced by the current Piwik domain -login_password_recovery_email_address = "password-recovery@{DOMAIN}" -; name that appears as a Sender in the password recovery email -login_password_recovery_email_name = Piwik - -; email address that appears as a Reply-to in the password recovery email -; if specified, {DOMAIN} will be replaced by the current Piwik domain -login_password_recovery_replyto_email_address = "no-reply@{DOMAIN}" -; name that appears as a Reply-to in the password recovery email -login_password_recovery_replyto_email_name = "No-reply" - -; By default when user logs out they are redirected to Piwik "homepage" usually the Login form. -; Uncomment the next line to set a URL to redirect the user to after they log out of Piwik. -; login_logout_url = http://... - -; Set to 1 to disable the framebuster on standard Non-widgets pages (a click-jacking countermeasure). -; Default is 0 (i.e., bust frames on all non Widget pages such as Login, API, Widgets, Email reports, etc.). -enable_framed_pages = 0 - -; Set to 1 to disable the framebuster on Admin pages (a click-jacking countermeasure). -; Default is 0 (i.e., bust frames on the Settings forms). -enable_framed_settings = 0 - -; language cookie name for session -language_cookie_name = piwik_lang - -; standard email address displayed when sending emails -noreply_email_address = "noreply@{DOMAIN}" - -; standard email name displayed when sending emails. If not set, a default name will be used. -noreply_email_name = "" - -; feedback email address; -; when testing, use your own email address or "nobody" -feedback_email_address = "feedback@piwik.org" - -; using to set reply_to in reports e-mail to login of report creator -scheduled_reports_replyto_is_user_email_and_alias = 0 - -; scheduled reports truncate limit -; the report will be rendered with the first 23 rows and will aggregate other rows in a summary row -; 23 rows table fits in one portrait page -scheduled_reports_truncate = 23 - -; during archiving, Piwik will limit the number of results recorded, for performance reasons -; maximum number of rows for any of the Referrers tables (keywords, search engines, campaigns, etc.) -datatable_archiving_maximum_rows_referrers = 1000 -; maximum number of rows for any of the Referrers subtable (search engines by keyword, keyword by campaign, etc.) -datatable_archiving_maximum_rows_subtable_referrers = 50 - -; maximum number of rows for the Users report -datatable_archiving_maximum_rows_userid_users = 50000 - -; maximum number of rows for the Custom Variables names report -; Note: if the website is Ecommerce enabled, the two values below will be automatically set to 50000 -datatable_archiving_maximum_rows_custom_variables = 1000 -; maximum number of rows for the Custom Variables values reports -datatable_archiving_maximum_rows_subtable_custom_variables = 1000 - -; maximum number of rows for any of the Actions tables (pages, downloads, outlinks) -datatable_archiving_maximum_rows_actions = 500 -; maximum number of rows for pages in categories (sub pages, when clicking on the + for a page category) -; note: should not exceed the display limit in Piwik\Actions\Controller::ACTIONS_REPORT_ROWS_DISPLAY -; because each subdirectory doesn't have paging at the bottom, so all data should be displayed if possible. -datatable_archiving_maximum_rows_subtable_actions = 100 - -; maximum number of rows for any of the Events tables (Categories, Actions, Names) -datatable_archiving_maximum_rows_events = 500 -; maximum number of rows for sub-tables of the Events tables (eg. for the subtables Categories>Actions or Categories>Names). -datatable_archiving_maximum_rows_subtable_events = 100 - -; maximum number of rows for other tables (Providers, User settings configurations) -datatable_archiving_maximum_rows_standard = 500 - -; maximum number of rows to fetch from the database when archiving. if set to 0, no limit is used. -; this can be used to speed up the archiving process, but is only useful if you're site has a large -; amount of actions, referrers or custom variable name/value pairs. -archiving_ranking_query_row_limit = 50000 - -; maximum number of actions that is shown in the visitor log for each visitor -visitor_log_maximum_actions_per_visit = 500 - -; by default, the real time Live! widget will update every 5 seconds and refresh with new visits/actions/etc. -; you can change the timeout so the widget refreshes more often, or not as frequently -live_widget_refresh_after_seconds = 5 - -; by default, the Live! real time visitor count widget will check to see how many visitors your -; website received in the last 3 minutes. changing this value will change the number of minutes -; the widget looks in. -live_widget_visitor_count_last_minutes = 3 - -; In "All Websites" dashboard, when looking at today's reports (or a date range including today), -; the page will automatically refresh every 5 minutes. Set to 0 to disable automatic refresh -multisites_refresh_after_seconds = 300 - -; Set to 1 if you're using https on your Piwik server and Piwik can't detect it, -; e.g., a reverse proxy using https-to-http, or a web server that doesn't -; set the HTTPS environment variable. -assume_secure_protocol = 0 - -; Set to 1 if you're using more than one server for your Piwik installation. For example if you are using Piwik in a -; load balanced environment, if you have configured failover or if you're just using multiple servers in general. -; By enabling this flag we will for example not allow the installation of a plugin via the UI as a plugin would be only -; installed on one server or a config one change would be only made on one server instead of all servers. -multi_server_environment = 0 - -; List of proxy headers for client IP addresses -; Piwik will determine the user IP by extracting the first IP address found in this proxy header. -; -; CloudFlare (CF-Connecting-IP) -;proxy_client_headers[] = HTTP_CF_CONNECTING_IP -; -; ISP proxy (Client-IP) -;proxy_client_headers[] = HTTP_CLIENT_IP -; -; de facto standard (X-Forwarded-For) -;proxy_client_headers[] = HTTP_X_FORWARDED_FOR - -; List of proxy headers for host IP addresses -; -; de facto standard (X-Forwarded-Host) -;proxy_host_headers[] = HTTP_X_FORWARDED_HOST - -; List of proxy IP addresses (or IP address ranges) to skip (if present in the above headers). -; Generally, only required if there's more than one proxy between the visitor and the backend web server. -; -; Examples: -;proxy_ips[] = 204.93.240.* -;proxy_ips[] = 204.93.177.0/24 -;proxy_ips[] = 199.27.128.0/21 -;proxy_ips[] = 173.245.48.0/20 - -; Whether to enable trusted host checking. This can be disabled if you're running Piwik -; on several URLs and do not wish to constantly edit the trusted host list. -enable_trusted_host_check = 1 - -; List of trusted hosts (eg domain or subdomain names) when generating absolute URLs. -; -; Examples: -;trusted_hosts[] = example.com -;trusted_hosts[] = stats.example.com - -; List of Cross-origin resource sharing domains (eg domain or subdomain names) when generating absolute URLs. -; Described here: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing -; -; Examples: -;cors_domains[] = http://example.com -;cors_domains[] = http://stats.example.com -; -; Or you may allow cross domain requests for all domains with: -;cors_domains[] = * - -; If you use this Piwik instance over multiple hostnames, Piwik will need to know -; a unique instance_id for this instance, so that Piwik can serve the right custom logo and tmp/* assets, -; independently of the hostname Piwik is currently running under. -; instance_id = stats.example.com - -; The API server is an essential part of the Piwik infrastructure/ecosystem to -; provide services to Piwik installations, e.g., getLatestVersion and -; subscribeNewsletter. -api_service_url = http://api.piwik.org - -; When the ImageGraph plugin is activated, report metadata have an additional entry : 'imageGraphUrl'. -; This entry can be used to request a static graph for the requested report. -; When requesting report metadata with $period=range, Piwik needs to translate it to multiple periods for evolution graphs. -; eg. $period=range&date=previous10 becomes $period=day&date=previous10. Use this setting to override the $period value. -graphs_default_period_to_plot_when_period_range = day - -; When the ImageGraph plugin is activated, enabling this option causes the image graphs to show the evolution -; within the selected period instead of the evolution across the last n periods. -graphs_show_evolution_within_selected_period = 0 - -; The Overlay plugin shows the Top X following pages, Top X downloads and Top X outlinks which followed -; a view of the current page. The value X can be set here. -overlay_following_pages_limit = 300 - -; With this option, you can disable the framed mode of the Overlay plugin. Use it if your website contains a framebuster. -overlay_disable_framed_mode = 0 - -; By default we check whether the Custom logo is writable or not, before we display the Custom logo file uploader -enable_custom_logo_check = 1 - -; If php is running in a chroot environment, when trying to import CSV files with createTableFromCSVFile(), -; Mysql will try to load the chrooted path (which is incomplete). To prevent an error, here you can specify the -; absolute path to the chroot environment. eg. '/path/to/piwik/chrooted/' -absolute_chroot_path = - -; In some rare cases it may be useful to explicitely tell Piwik not to use LOAD DATA INFILE -; This may for example be useful when doing Mysql AWS replication -enable_load_data_infile = 1 - -; By setting this option to 0: -; - links to Enable/Disable/Uninstall plugins will be hidden and disabled -; - links to Uninstall themes will be disabled (but user can still enable/disable themes) -enable_plugins_admin = 1 - -; By setting this option to 1, it will be possible for Super Users to upload Piwik plugin ZIP archives directly in Piwik Administration. -; Enabling this opens a remote code execution vulnerability where -; an attacker who gained Super User access could execute custom PHP code in a Piwik plugin. -enable_plugin_upload = 0 - -; By setting this option to 0, you can prevent Super User from editing the Geolocation settings. -enable_geolocation_admin = 1 - -; By setting this option to 0, the old log data and old report data features will be hidden from the UI -; Note: log purging and old data purging still occurs, just the Super User cannot change the settings. -enable_delete_old_data_settings_admin = 1 - -; By setting this option to 0, the following settings will be hidden and disabled from being set in the UI: -; - "Archiving Settings" -; - "Update settings" -; - "Email server settings" -enable_general_settings_admin = 1 - -; By setting this option to 0, it will disable the "Auto update" feature -enable_auto_update = 1 - -; By setting this option to 0, no emails will be sent in case of an available core. -; If set to 0 it also disables the "sent plugin update emails" feature in general and the related setting in the UI. -enable_update_communication = 1 - -; Comma separated list of plugin names for which console commands should be loaded (applies when Piwik is not installed yet) -always_load_commands_from_plugin= - -; This controls whether the pivotBy query parameter can be used with any dimension or just subtable -; dimensions. If set to 1, it will fetch a report with a segment for each row of the table being pivoted. -; At present, this is very inefficient, so it is disabled by default. -pivot_by_filter_enable_fetch_by_segment = 0 - -; This controls the default maximum number of columns to display in a pivot table. Since a pivot table displays -; a table's rows as columns, the number of columns can become very large, which will affect webpage layouts. -; Set to -1 to specify no limit. Note: The pivotByColumnLimit query parameter can be used to override this default -; on a per-request basis; -pivot_by_filter_default_column_limit = 10 - -; If set to 0 it will disable advertisements for providers of Professional Support for Piwik. -piwik_professional_support_ads_enabled = 1 - -[Tracker] - -; Piwik uses "Privacy by default" model. When one of your users visit multiple of your websites tracked in this Piwik, -; Piwik will create for this user a fingerprint that will be different across the multiple websites. -; If you want to track unique users across websites (for example when using the InterSites plugin) you may set this setting to 1. -; Note: setting this to 0 increases your users' privacy. -enable_fingerprinting_across_websites = 0 - -; Piwik uses first party cookies by default. If set to 1, -; the visit ID cookie will be set on the Piwik server domain as well -; this is useful when you want to do cross websites analysis -use_third_party_id_cookie = 0 - -; If tracking does not work for you or you are stuck finding an issue, you might want to enable the tracker debug mode. -; Once enabled (set to 1) messages will be logged to all loggers defined in "[log] log_writers" config. -debug = 0 - -; This option is an alternative to the debug option above. When set to 1, you can debug tracker request by adding -; a debug=1 query parameter in the URL. All other HTTP requests will not have debug enabled. For security reasons this -; option should be only enabled if really needed and only for a short time frame. Otherwise anyone can set debug=1 and -; see the log output as well. -debug_on_demand = 0 - -; This setting is described in this FAQ: http://piwik.org/faq/how-to/faq_175/ -; Note: generally this should only be set to 1 in an intranet setting, where most users have the same configuration (browsers, OS) -; and the same IP. If left to 0 in this setting, all visitors will be counted as one single visitor. -trust_visitors_cookies = 0 - -; name of the cookie used to store the visitor information -; This is used only if use_third_party_id_cookie = 1 -cookie_name = _pk_uid - -; by default, the Piwik tracking cookie expires in 13 months (365 + 28 days) -; This is used only if use_third_party_id_cookie = 1 -cookie_expire = 33955200; - -; The path on the server in which the cookie will be available on. -; Defaults to empty. See spec in http://curl.haxx.se/rfc/cookie_spec.html -; This is used for the Ignore cookie, and the third party cookie if use_third_party_id_cookie = 1 -cookie_path = - -; set to 0 if you want to stop tracking the visitors. Useful if you need to stop all the connections on the DB. -record_statistics = 1 - -; length of a visit in seconds. If a visitor comes back on the website visit_standard_length seconds -; after their last page view, it will be recorded as a new visit. In case you are using the Piwik JavaScript tracker to -; calculate the visit count correctly, make sure to call the method "setSessionCookieTimeout" eg -; `_paq.push(['setSessionCookieTimeout', timeoutInSeconds=1800])` -visit_standard_length = 1800 - -; The window to look back for a previous visit by this current visitor. Defaults to visit_standard_length. -; If you are looking for higher accuracy of "returning visitors" metrics, you may set this value to 86400 or more. -; This is especially useful when you use the Tracking API where tracking Returning Visitors often depends on this setting. -; The value window_look_back_for_visitor is used only if it is set to greater than visit_standard_length -window_look_back_for_visitor = 0 - -; visitors that stay on the website and view only one page will be considered as time on site of 0 second -default_time_one_page_visit = 0 - -; Comma separated list of URL query string variable names that will be removed from your tracked URLs -; By default, Piwik will remove the most common parameters which are known to change often (eg. session ID parameters) -url_query_parameter_to_exclude_from_url = "gclid,fb_xd_fragment,fb_comment_id,phpsessid,jsessionid,sessionid,aspsessionid,doing_wp_cron,sid,pk_vid" - -; if set to 1, Piwik attempts a "best guess" at the visitor's country of -; origin when the preferred language tag omits region information. -; The mapping is defined in core/DataFiles/LanguageToCountry.php, -enable_language_to_country_guess = 1 - -; When the `./console core:archive` cron hasn't been setup, we still need to regularly run some maintenance tasks. -; Visits to the Tracker will try to trigger Scheduled Tasks (eg. scheduled PDF/HTML reports by email). -; Scheduled tasks will only run if 'Enable Piwik Archiving from Browser' is enabled in the General Settings. -; Tasks run once every hour maximum, they might not run every hour if traffic is low. -; Set to 0 to disable Scheduled tasks completely. -scheduled_tasks_min_interval = 3600 - -; name of the cookie to ignore visits -ignore_visits_cookie_name = piwik_ignore - -; Comma separated list of variable names that will be read to define a Campaign name, for example CPC campaign -; Example: If a visitor first visits 'index.php?piwik_campaign=Adwords-CPC' then it will be counted as a campaign referrer named 'Adwords-CPC' -; Includes by default the GA style campaign parameters -campaign_var_name = "pk_cpn,pk_campaign,piwik_campaign,utm_campaign,utm_source,utm_medium" - -; Comma separated list of variable names that will be read to track a Campaign Keyword -; Example: If a visitor first visits 'index.php?piwik_campaign=Adwords-CPC&piwik_kwd=My killer keyword' ; -; then it will be counted as a campaign referrer named 'Adwords-CPC' with the keyword 'My killer keyword' -; Includes by default the GA style campaign keyword parameter utm_term -campaign_keyword_var_name = "pk_kwd,pk_keyword,piwik_kwd,utm_term" - -; if set to 1, actions that contain different campaign information from the visitor's ongoing visit will -; be treated as the start of a new visit. This will include situations when campaign information was absent before, -; but is present now. -create_new_visit_when_campaign_changes = 1 - -; if set to 1, actions that contain different website referrer information from the visitor's ongoing visit -; will be treated as the start of a new visit. This will include situations when website referrer information was -; absent before, but is present now. -create_new_visit_when_website_referrer_changes = 0 - -; ONLY CHANGE THIS VALUE WHEN YOU DO NOT USE PIWIK ARCHIVING, SINCE THIS COULD CAUSE PARTIALLY MISSING ARCHIVE DATA -; Whether to force a new visit at midnight for every visitor. Default 1. -create_new_visit_after_midnight = 1 - -; maximum length of a Page Title or a Page URL recorded in the log_action.name table -page_maximum_length = 1024; - -; Tracker cache files are the simple caching layer for Tracking. -; TTL: Time to live for cache files, in seconds. Default to 5 minutes. -tracker_cache_file_ttl = 300 - -; Whether Bulk tracking requests to the Tracking API requires the token_auth to be set. -bulk_requests_require_authentication = 0 - -; Whether Bulk tracking requests will be wrapped within a DB Transaction. -; This greatly increases performance of Log Analytics and in general any Bulk Tracking API requests. -bulk_requests_use_transaction = 1 - -; DO NOT USE THIS SETTING ON PUBLICLY AVAILABLE PIWIK SERVER -; !!! Security risk: if set to 0, it would allow anyone to push data to Piwik with custom dates in the past/future and even with fake IPs! -; When using the Tracking API, to override either the datetime and/or the visitor IP, -; token_auth with an "admin" access is required. If you set this setting to 0, the token_auth will not be required anymore. -; DO NOT USE THIS SETTING ON PUBLIC PIWIK SERVERS -tracking_requests_require_authentication = 1 - -; By default, Piwik accepts only tracking requests for up to 1 day in the past. For tracking requests with a custom date -; date is older than 1 day, Piwik requires an authenticated tracking requests. By setting this config to another value -; You can change how far back Piwik will track your requests without authentication. The configured value is in seconds. -tracking_requests_require_authentication_when_custom_timestamp_newer_than = 86400; - -[Segments] -; Reports with segmentation in API requests are processed in real time. -; On high traffic websites it is recommended to pre-process the data -; so that the analytics reports are always fast to load. -; You can define below the list of Segments strings -; for which all reports should be Archived during the cron execution -; All segment values MUST be URL encoded. -;Segments[]="visitorType==new" -;Segments[]="visitorType==returning,visitorType==returningCustomer" - -; If you define Custom Variables for your visitor, for example set the visit type -;Segments[]="customVariableName1==VisitType;customVariableValue1==Customer" - -[Deletelogs] -; delete_logs_enable - enable (1) or disable (0) delete log feature. Make sure that all archives for the given period have been processed (setup a cronjob!), -; otherwise you may lose tracking data. -; delete_logs_schedule_lowest_interval - lowest possible interval between two table deletes (in days, 1|7|30). Default: 7. -; delete_logs_older_than - delete data older than XX (days). Default: 180 -delete_logs_enable = 0 -delete_logs_schedule_lowest_interval = 7 -delete_logs_older_than = 180 -delete_logs_max_rows_per_query = 100000 -enable_auto_database_size_estimate = 1 - -[Deletereports] -delete_reports_enable = 0 -delete_reports_older_than = 12 -delete_reports_keep_basic_metrics = 1 -delete_reports_keep_day_reports = 0 -delete_reports_keep_week_reports = 0 -delete_reports_keep_month_reports = 1 -delete_reports_keep_year_reports = 1 -delete_reports_keep_range_reports = 0 -delete_reports_keep_segment_reports = 0 - -[mail] -defaultHostnameIfEmpty = defaultHostnameIfEmpty.example.org ; default Email @hostname, if current host can't be read from system variables -transport = ; smtp (using the configuration below) or empty (using built-in mail() function) -port = ; optional; defaults to 25 when security is none or tls; 465 for ssl -host = ; SMTP server address -type = ; SMTP Auth type. By default: NONE. For example: LOGIN -username = ; SMTP username -password = ; SMTP password -encryption = ; SMTP transport-layer encryption, either 'ssl', 'tls', or empty (i.e., none). - -[proxy] -type = BASIC ; proxy type for outbound/outgoing connections; currently, only BASIC is supported -host = ; Proxy host: the host name of your proxy server (mandatory) -port = ; Proxy port: the port that the proxy server listens to. There is no standard default, but 80, 1080, 3128, and 8080 are popular -username = ; Proxy username: optional; if specified, password is mandatory -password = ; Proxy password: optional; if specified, username is mandatory - -[Plugins] -; list of plugins (in order they will be loaded) that are activated by default in the Piwik platform -Plugins[] = CorePluginsAdmin -Plugins[] = CoreAdminHome -Plugins[] = CoreHome -Plugins[] = WebsiteMeasurable -Plugins[] = Diagnostics -Plugins[] = CoreVisualizations -Plugins[] = Proxy -Plugins[] = API -Plugins[] = ExamplePlugin -Plugins[] = Widgetize -Plugins[] = Transitions -Plugins[] = LanguagesManager -Plugins[] = Actions -Plugins[] = Dashboard -Plugins[] = MultiSites -Plugins[] = Referrers -Plugins[] = UserLanguage -Plugins[] = DevicesDetection -Plugins[] = Goals -Plugins[] = Ecommerce -Plugins[] = SEO -Plugins[] = Events -Plugins[] = UserCountry -Plugins[] = VisitsSummary -Plugins[] = VisitFrequency -Plugins[] = VisitTime -Plugins[] = VisitorInterest -Plugins[] = ExampleAPI -Plugins[] = RssWidget -Plugins[] = Feedback -Plugins[] = Monolog - -Plugins[] = Login -Plugins[] = UsersManager -Plugins[] = SitesManager -Plugins[] = Installation -Plugins[] = CoreUpdater -Plugins[] = CoreConsole -Plugins[] = ScheduledReports -Plugins[] = UserCountryMap -Plugins[] = Live -Plugins[] = CustomVariables -Plugins[] = PrivacyManager -Plugins[] = ImageGraph -Plugins[] = Annotations -Plugins[] = MobileMessaging -Plugins[] = Overlay -Plugins[] = SegmentEditor -Plugins[] = Insights -Plugins[] = Morpheus -Plugins[] = Contents -Plugins[] = BulkTracking -Plugins[] = Resolution -Plugins[] = DevicePlugins -Plugins[] = Heartbeat -Plugins[] = Intl -Plugins[] = Marketplace -Plugins[] = ProfessionalServices -Plugins[] = UserId -Plugins[] = CustomPiwikJs - -[PluginsInstalled] -PluginsInstalled[] = Diagnostics -PluginsInstalled[] = Login -PluginsInstalled[] = CoreAdminHome -PluginsInstalled[] = UsersManager -PluginsInstalled[] = SitesManager -PluginsInstalled[] = Installation -PluginsInstalled[] = Monolog -PluginsInstalled[] = Intl - -[APISettings] -; Any key/value pair can be added in this section, they will be available via the REST call -; index.php?module=API&method=API.getSettings -; This can be used to expose values from Piwik, to control for example a Mobile app tracking -SDK_batch_size = 10 -SDK_interval_value = 30 - -; NOTE: do not directly edit this file! See notice at the top - diff --git a/modules/apache/conf/httpd.conf b/modules/apache/conf/httpd.conf deleted file mode 100644 index 70ba498f..00000000 --- a/modules/apache/conf/httpd.conf +++ /dev/null @@ -1,1050 +0,0 @@ -# -# Based upon the NCSA server configuration files originally by Rob McCool. -# -# This is the main Apache server configuration file. It contains the -# configuration directives that give the server its instructions. -# See for detailed information about -# the directives. -# -# Do NOT simply read the instructions in here without understanding -# what they do. They're here only as hints or reminders. If you are unsure -# consult the online docs. You have been warned. -# -# The configuration directives are grouped into three basic sections: -# 1. Directives that control the operation of the Apache server process as a -# whole (the 'global environment'). -# 2. Directives that define the parameters of the 'main' or 'default' server, -# which responds to requests that aren't handled by a virtual host. -# These directives also provide default values for the settings -# of all virtual hosts. -# 3. Settings for virtual hosts, which allow Web requests to be sent to -# different IP addresses or hostnames and have them handled by the -# same Apache server process. -# -# Configuration and logfile names: If the filenames you specify for many -# of the server's control files begin with "/" (or "drive:/" for Win32), the -# server will use that explicit path. If the filenames do *not* begin -# with "/", the value of ServerRoot is prepended -- so "logs/foo.log" -# with ServerRoot set to "/etc/httpd" will be interpreted by the -# server as "/etc/httpd/logs/foo.log". -# - -### Section 1: Global Environment -# -# The directives in this section affect the overall operation of Apache, -# such as the number of concurrent requests it can handle or where it -# can find its configuration files. -# - -# -# Don't give away too much information about all the subcomponents -# we are running. Comment out this line if you don't mind remote sites -# finding out what major optional modules you are running -ServerTokens OS - -# -# ServerRoot: The top of the directory tree under which the server's -# configuration, error, and log files are kept. -# -# NOTE! If you intend to place this on an NFS (or otherwise network) -# mounted filesystem then please read the LockFile documentation -# (available at ); -# you will save yourself a lot of trouble. -# -# Do NOT add a slash at the end of the directory path. -# -ServerRoot "/etc/httpd" - -# -# PidFile: The file in which the server should record its process -# identification number when it starts. -# -PidFile run/httpd.pid - -# -# Timeout: The number of seconds before receives and sends time out. -# -Timeout 120 - -# -# KeepAlive: Whether or not to allow persistent connections (more than -# one request per connection). Set to "Off" to deactivate. -# -KeepAlive Off - -# -# MaxKeepAliveRequests: The maximum number of requests to allow -# during a persistent connection. Set to 0 to allow an unlimited amount. -# We recommend you leave this number high, for maximum performance. -# -MaxKeepAliveRequests 100 - -# -# KeepAliveTimeout: Number of seconds to wait for the next request from the -# same client on the same connection. -# -KeepAliveTimeout 15 - -## -## Server-Pool Size Regulation (MPM specific) -## - -# prefork MPM -# StartServers: number of server processes to start -# MinSpareServers: minimum number of server processes which are kept spare -# MaxSpareServers: maximum number of server processes which are kept spare -# ServerLimit: maximum value for MaxClients for the lifetime of the server -# MaxClients: maximum number of server processes allowed to start -# MaxRequestsPerChild: maximum number of requests a server process serves - -StartServers 8 -MinSpareServers 5 -MaxSpareServers 20 -ServerLimit 256 -MaxClients 256 -MaxRequestsPerChild 4000 - - -# worker MPM -# StartServers: initial number of server processes to start -# MaxClients: maximum number of simultaneous client connections -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestsPerChild: maximum number of requests a server process serves - -StartServers 2 -MaxClients 150 -MinSpareThreads 25 -MaxSpareThreads 75 -ThreadsPerChild 25 -MaxRequestsPerChild 0 - - -# -# Listen: Allows you to bind Apache to specific IP addresses and/or -# ports, in addition to the default. See also the -# directive. -# -# Change this to Listen on specific IP addresses as shown below to -# prevent Apache from glomming onto all bound IP addresses (0.0.0.0) -# -#Listen 12.34.56.78:80 -Listen 80 - -# -# Dynamic Shared Object (DSO) Support -# -# To be able to use the functionality of a module which was built as a DSO you -# have to place corresponding `LoadModule' lines at this location so the -# directives contained in it are actually available _before_ they are used. -# Statically compiled modules (those listed by `httpd -l') do not need -# to be loaded here. -# -# Example: -# LoadModule foo_module modules/mod_foo.so -# -LoadModule access_module modules/mod_access.so -LoadModule auth_module modules/mod_auth.so -LoadModule auth_anon_module modules/mod_auth_anon.so -LoadModule auth_dbm_module modules/mod_auth_dbm.so -LoadModule auth_digest_module modules/mod_auth_digest.so -LoadModule ldap_module modules/mod_ldap.so -LoadModule auth_ldap_module modules/mod_auth_ldap.so -LoadModule include_module modules/mod_include.so -LoadModule log_config_module modules/mod_log_config.so -LoadModule env_module modules/mod_env.so -LoadModule mime_magic_module modules/mod_mime_magic.so -LoadModule cern_meta_module modules/mod_cern_meta.so -LoadModule expires_module modules/mod_expires.so -LoadModule deflate_module modules/mod_deflate.so -LoadModule headers_module modules/mod_headers.so -LoadModule usertrack_module modules/mod_usertrack.so -LoadModule setenvif_module modules/mod_setenvif.so -LoadModule mime_module modules/mod_mime.so -LoadModule dav_module modules/mod_dav.so -LoadModule status_module modules/mod_status.so -LoadModule autoindex_module modules/mod_autoindex.so -LoadModule asis_module modules/mod_asis.so -LoadModule info_module modules/mod_info.so -LoadModule dav_fs_module modules/mod_dav_fs.so -LoadModule vhost_alias_module modules/mod_vhost_alias.so -LoadModule negotiation_module modules/mod_negotiation.so -LoadModule dir_module modules/mod_dir.so -LoadModule imap_module modules/mod_imap.so -LoadModule actions_module modules/mod_actions.so -LoadModule speling_module modules/mod_speling.so -LoadModule userdir_module modules/mod_userdir.so -LoadModule alias_module modules/mod_alias.so -LoadModule rewrite_module modules/mod_rewrite.so -LoadModule proxy_module modules/mod_proxy.so -LoadModule proxy_ftp_module modules/mod_proxy_ftp.so -LoadModule proxy_http_module modules/mod_proxy_http.so -LoadModule proxy_connect_module modules/mod_proxy_connect.so -LoadModule cache_module modules/mod_cache.so -LoadModule suexec_module modules/mod_suexec.so -LoadModule disk_cache_module modules/mod_disk_cache.so -LoadModule file_cache_module modules/mod_file_cache.so -LoadModule mem_cache_module modules/mod_mem_cache.so -LoadModule cgi_module modules/mod_cgi.so - -#*************************************************** -# For MassBank (Apache Tomcat Connector) -#*************************************************** -LoadModule jk_module modules/mod_jk.so - - Include conf/mod_jk.conf - - -# -# Load config files from the config directory "/etc/httpd/conf.d". -# -Include conf.d/*.conf - -# -# ExtendedStatus controls whether Apache will generate "full" status -# information (ExtendedStatus On) or just basic information (ExtendedStatus -# Off) when the "server-status" handler is called. The default is Off. -# -#ExtendedStatus On - -### Section 2: 'Main' server configuration -# -# The directives in this section set up the values used by the 'main' -# server, which responds to any requests that aren't handled by a -# definition. These values also provide defaults for -# any containers you may define later in the file. -# -# All of these directives may appear inside containers, -# in which case these default settings will be overridden for the -# virtual host being defined. -# - -# -# If you wish httpd to run as a different user or group, you must run -# httpd as root initially and it will switch. -# -# User/Group: The name (or #number) of the user/group to run httpd as. -# . On SCO (ODT 3) use "User nouser" and "Group nogroup". -# . On HPUX you may not be able to use shared memory as nobody, and the -# suggested workaround is to create a user www and use that user. -# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) -# when the value of (unsigned)Group is above 60000; -# don't use Group #-1 on these systems! -# -User apache -Group apache - -# -# ServerAdmin: Your address, where problems with the server should be -# e-mailed. This address appears on some server-generated pages, such -# as error documents. e.g. admin@your-domain.com -# -ServerAdmin root@localhost - -# -# ServerName gives the name and port that the server uses to identify itself. -# This can often be determined automatically, but we recommend you specify -# it explicitly to prevent problems during startup. -# -# If this is not set to valid DNS name for your host, server-generated -# redirections will not work. See also the UseCanonicalName directive. -# -# If your host doesn't have a registered DNS name, enter its IP address here. -# You will have to access it by its address anyway, and this will make -# redirections work in a sensible way. -# -#ServerName new.host.name:80 - -# -# UseCanonicalName: Determines how Apache constructs self-referencing -# URLs and the SERVER_NAME and SERVER_PORT variables. -# When set "Off", Apache will use the Hostname and Port supplied -# by the client. When set "On", Apache will use the value of the -# ServerName directive. -# -UseCanonicalName Off - -# -# DocumentRoot: The directory out of which you will serve your -# documents. By default, all requests are taken from this directory, but -# symbolic links and aliases may be used to point to other locations. -# -DocumentRoot "/var/www/html" - -# -# Each directory to which Apache has access can be configured with respect -# to which services and features are allowed and/or disabled in that -# directory (and its subdirectories). -# -# First, we configure the "default" to be a very restrictive set of -# features. -# - - Options FollowSymLinks - AllowOverride None - - -# -# Note that from this point forward you must specifically allow -# particular features to be enabled - so if something's not working as -# you might expect, make sure that you have specifically enabled it -# below. -# - -# -# This should be changed to whatever you set DocumentRoot to. -# - - -# -# Possible values for the Options directive are "None", "All", -# or any combination of: -# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews -# -# Note that "MultiViews" must be named *explicitly* --- "Options All" -# doesn't give it to you. -# -# The Options directive is both complicated and important. Please see -# http://httpd.apache.org/docs-2.0/mod/core.html#options -# for more information. -# - Options Indexes FollowSymLinks - -# -# AllowOverride controls what directives may be placed in .htaccess files. -# It can be "All", "None", or any combination of the keywords: -# Options FileInfo AuthConfig Limit -# - AllowOverride None - -# -# Controls who can get stuff from this server. -# - Order allow,deny - Allow from all - - - -# -# UserDir: The name of the directory that is appended onto a user's home -# directory if a ~user request is received. -# -# The path to the end user account 'public_html' directory must be -# accessible to the webserver userid. This usually means that ~userid -# must have permissions of 711, ~userid/public_html must have permissions -# of 755, and documents contained therein must be world-readable. -# Otherwise, the client will only receive a "403 Forbidden" message. -# -# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden -# - - # - # UserDir is disabled by default since it can confirm the presence - # of a username on the system (depending on home directory - # permissions). - # - UserDir disable - - # - # To enable requests to /~user/ to serve the user's public_html - # directory, remove the "UserDir disable" line above, and uncomment - # the following line instead: - # - #UserDir public_html - - - -# -# Control access to UserDir directories. The following is an example -# for a site where these directories are restricted to read-only. -# -# -# AllowOverride FileInfo AuthConfig Limit -# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec -# -# Order allow,deny -# Allow from all -# -# -# Order deny,allow -# Deny from all -# -# - -# -# DirectoryIndex: sets the file that Apache will serve if a directory -# is requested. -# -# The index.html.var file (a type-map) is used to deliver content- -# negotiated documents. The MultiViews Option can be used for the -# same purpose, but it is much slower. -# -DirectoryIndex index.html index.html.var - -# -# AccessFileName: The name of the file to look for in each directory -# for additional configuration directives. See also the AllowOverride -# directive. -# -AccessFileName .htaccess - -# -# The following lines prevent .htaccess and .htpasswd files from being -# viewed by Web clients. -# - - Order allow,deny - Deny from all - - -# -# TypesConfig describes where the mime.types file (or equivalent) is -# to be found. -# -TypesConfig /etc/mime.types - -# -# DefaultType is the default MIME type the server will use for a document -# if it cannot otherwise determine one, such as from filename extensions. -# If your server contains mostly text or HTML documents, "text/plain" is -# a good value. If most of your content is binary, such as applications -# or images, you may want to use "application/octet-stream" instead to -# keep browsers from trying to display binary files as though they are -# text. -# -DefaultType text/plain - -# -# The mod_mime_magic module allows the server to use various hints from the -# contents of the file itself to determine its type. The MIMEMagicFile -# directive tells the module where the hint definitions are located. -# - -# MIMEMagicFile /usr/share/magic.mime - MIMEMagicFile conf/magic - - -# -# HostnameLookups: Log the names of clients or just their IP addresses -# e.g., www.apache.org (on) or 204.62.129.132 (off). -# The default is off because it'd be overall better for the net if people -# had to knowingly turn this feature on, since enabling it means that -# each client request will result in AT LEAST one lookup request to the -# nameserver. -# -HostnameLookups Off - -# -# EnableMMAP: Control whether memory-mapping is used to deliver -# files (assuming that the underlying OS supports it). -# The default is on; turn this off if you serve from NFS-mounted -# filesystems. On some systems, turning it off (regardless of -# filesystem) can improve performance; for details, please see -# http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap -# -#EnableMMAP off - -# -# EnableSendfile: Control whether the sendfile kernel support is -# used to deliver files (assuming that the OS supports it). -# The default is on; turn this off if you serve from NFS-mounted -# filesystems. Please see -# http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile -# -#EnableSendfile off - -# -# ErrorLog: The location of the error log file. -# If you do not specify an ErrorLog directive within a -# container, error messages relating to that virtual host will be -# logged here. If you *do* define an error logfile for a -# container, that host's errors will be logged there and not here. -# -ErrorLog logs/error_log - -# -# LogLevel: Control the number of messages logged to the error_log. -# Possible values include: debug, info, notice, warn, error, crit, -# alert, emerg. -# -LogLevel warn - -# -# The following directives define some format nicknames for use with -# a CustomLog directive (see below). -# -LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %b" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -# -# The location and format of the access logfile (Common Logfile Format). -# If you do not define any access logfiles within a -# container, they will be logged here. Contrariwise, if you *do* -# define per- access logfiles, transactions will be -# logged therein and *not* in this file. -# -#CustomLog logs/access_log common - -# -# If you would like to have agent and referer logfiles, uncomment the -# following directives. -# -#CustomLog logs/referer_log referer -#CustomLog logs/agent_log agent - -# -# For a single logfile with access, agent, and referer information -# (Combined Logfile Format), use the following directive: -# -CustomLog logs/access_log combined - -# -# Optionally add a line containing the server version and virtual host -# name to server-generated pages (internal error documents, FTP directory -# listings, mod_status and mod_info output etc., but not CGI generated -# documents or custom error documents). -# Set to "EMail" to also include a mailto: link to the ServerAdmin. -# Set to one of: On | Off | EMail -# -ServerSignature On - -# -# Aliases: Add here as many aliases as you need (with no limit). The format is -# Alias fakename realname -# -# Note that if you include a trailing / on fakename then the server will -# require it to be present in the URL. So "/icons" isn't aliased in this -# example, only "/icons/". If the fakename is slash-terminated, then the -# realname must also be slash terminated, and if the fakename omits the -# trailing slash, the realname must also omit it. -# -# We include the /icons/ alias for FancyIndexed directory listings. If you -# do not use FancyIndexing, you may comment this out. -# -Alias /icons/ "/var/www/icons/" - - - Options Indexes MultiViews - AllowOverride None - Order allow,deny - Allow from all - - -# -# WebDAV module configuration section. -# - - # Location of the WebDAV lock database. - DAVLockDB /var/lib/dav/lockdb - - -# -# ScriptAlias: This controls which directories contain server scripts. -# ScriptAliases are essentially the same as Aliases, except that -# documents in the realname directory are treated as applications and -# run by the server when requested rather than as documents sent to the client. -# The same rules about trailing "/" apply to ScriptAlias directives as to -# Alias. -# -ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" - -# -# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased -# CGI directory exists, if you have that configured. -# - - AllowOverride None - Options None - Order allow,deny - Allow from all - - -# -# Redirect allows you to tell clients about documents which used to exist in -# your server's namespace, but do not anymore. This allows you to tell the -# clients where to look for the relocated document. -# Example: -# Redirect permanent /foo http://www.example.com/bar - -# -# Directives controlling the display of server-generated directory listings. -# - -# -# IndexOptions: Controls the appearance of server-generated directory -# listings. -# -IndexOptions FancyIndexing VersionSort NameWidth=* - -# -# AddIcon* directives tell the server which icon to show for different -# files or filename extensions. These are only displayed for -# FancyIndexed directories. -# -AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip - -AddIconByType (TXT,/icons/text.gif) text/* -AddIconByType (IMG,/icons/image2.gif) image/* -AddIconByType (SND,/icons/sound2.gif) audio/* -AddIconByType (VID,/icons/movie.gif) video/* - -AddIcon /icons/binary.gif .bin .exe -AddIcon /icons/binhex.gif .hqx -AddIcon /icons/tar.gif .tar -AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv -AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip -AddIcon /icons/a.gif .ps .ai .eps -AddIcon /icons/layout.gif .html .shtml .htm .pdf -AddIcon /icons/text.gif .txt -AddIcon /icons/c.gif .c -AddIcon /icons/p.gif .pl .py -AddIcon /icons/f.gif .for -AddIcon /icons/dvi.gif .dvi -AddIcon /icons/uuencoded.gif .uu -AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl -AddIcon /icons/tex.gif .tex -AddIcon /icons/bomb.gif core - -AddIcon /icons/back.gif .. -AddIcon /icons/hand.right.gif README -AddIcon /icons/folder.gif ^^DIRECTORY^^ -AddIcon /icons/blank.gif ^^BLANKICON^^ - -# -# DefaultIcon is which icon to show for files which do not have an icon -# explicitly set. -# -DefaultIcon /icons/unknown.gif - -# -# AddDescription allows you to place a short description after a file in -# server-generated indexes. These are only displayed for FancyIndexed -# directories. -# Format: AddDescription "description" filename -# -#AddDescription "GZIP compressed document" .gz -#AddDescription "tar archive" .tar -#AddDescription "GZIP compressed tar archive" .tgz - -# -# ReadmeName is the name of the README file the server will look for by -# default, and append to directory listings. -# -# HeaderName is the name of a file which should be prepended to -# directory indexes. -ReadmeName README.html -HeaderName HEADER.html - -# -# IndexIgnore is a set of filenames which directory indexing should ignore -# and not include in the listing. Shell-style wildcarding is permitted. -# -IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t - -# -# DefaultLanguage and AddLanguage allows you to specify the language of -# a document. You can then use content negotiation to give a browser a -# file in a language the user can understand. -# -# Specify a default language. This means that all data -# going out without a specific language tag (see below) will -# be marked with this one. You probably do NOT want to set -# this unless you are sure it is correct for all cases. -# -# * It is generally better to not mark a page as -# * being a certain language than marking it with the wrong -# * language! -# -# DefaultLanguage nl -# -# Note 1: The suffix does not have to be the same as the language -# keyword --- those with documents in Polish (whose net-standard -# language code is pl) may wish to use "AddLanguage pl .po" to -# avoid the ambiguity with the common suffix for perl scripts. -# -# Note 2: The example entries below illustrate that in some cases -# the two character 'Language' abbreviation is not identical to -# the two character 'Country' code for its country, -# E.g. 'Danmark/dk' versus 'Danish/da'. -# -# Note 3: In the case of 'ltz' we violate the RFC by using a three char -# specifier. There is 'work in progress' to fix this and get -# the reference data for rfc1766 cleaned up. -# -# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) -# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) -# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) -# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) -# Norwegian (no) - Polish (pl) - Portugese (pt) -# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) -# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) -# -AddLanguage ca .ca -AddLanguage cs .cz .cs -AddLanguage da .dk -AddLanguage de .de -AddLanguage el .el -AddLanguage en .en -AddLanguage eo .eo -AddLanguage es .es -AddLanguage et .et -AddLanguage fr .fr -AddLanguage he .he -AddLanguage hr .hr -AddLanguage it .it -AddLanguage ja .ja -AddLanguage ko .ko -AddLanguage ltz .ltz -AddLanguage nl .nl -AddLanguage nn .nn -AddLanguage no .no -AddLanguage pl .po -AddLanguage pt .pt -AddLanguage pt-BR .pt-br -AddLanguage ru .ru -AddLanguage sv .sv -AddLanguage zh-CN .zh-cn -AddLanguage zh-TW .zh-tw - -# -# LanguagePriority allows you to give precedence to some languages -# in case of a tie during content negotiation. -# -# Just list the languages in decreasing order of preference. We have -# more or less alphabetized them here. You probably want to change this. -# -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW - -# -# ForceLanguagePriority allows you to serve a result page rather than -# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) -# [in case no accepted languages matched the available variants] -# -ForceLanguagePriority Prefer Fallback - -# -# Specify a default charset for all pages sent out. This is -# always a good idea and opens the door for future internationalisation -# of your web site, should you ever want it. Specifying it as -# a default does little harm; as the standard dictates that a page -# is in iso-8859-1 (latin1) unless specified otherwise i.e. you -# are merely stating the obvious. There are also some security -# reasons in browsers, related to javascript and URL parsing -# which encourage you to always set a default char set. -# -AddDefaultCharset UTF-8 - -# -# Commonly used filename extensions to character sets. You probably -# want to avoid clashes with the language extensions, unless you -# are good at carefully testing your setup after each change. -# See http://www.iana.org/assignments/character-sets for the -# official list of charset names and their respective RFCs. -# -AddCharset ISO-8859-1 .iso8859-1 .latin1 -AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen -AddCharset ISO-8859-3 .iso8859-3 .latin3 -AddCharset ISO-8859-4 .iso8859-4 .latin4 -AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru -AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb -AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk -AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb -AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk -AddCharset ISO-2022-JP .iso2022-jp .jis -AddCharset ISO-2022-KR .iso2022-kr .kis -AddCharset ISO-2022-CN .iso2022-cn .cis -AddCharset Big5 .Big5 .big5 -# For russian, more than one charset is used (depends on client, mostly): -AddCharset WINDOWS-1251 .cp-1251 .win-1251 -AddCharset CP866 .cp866 -AddCharset KOI8-r .koi8-r .koi8-ru -AddCharset KOI8-ru .koi8-uk .ua -AddCharset ISO-10646-UCS-2 .ucs2 -AddCharset ISO-10646-UCS-4 .ucs4 -AddCharset UTF-8 .utf8 - -# The set below does not map to a specific (iso) standard -# but works on a fairly wide range of browsers. Note that -# capitalization actually matters (it should not, but it -# does for some browsers). -# -# See http://www.iana.org/assignments/character-sets -# for a list of sorts. But browsers support few. -# -AddCharset GB2312 .gb2312 .gb -AddCharset utf-7 .utf7 -AddCharset utf-8 .utf8 -AddCharset big5 .big5 .b5 -AddCharset EUC-TW .euc-tw -AddCharset EUC-JP .euc-jp -AddCharset EUC-KR .euc-kr -AddCharset shift_jis .sjis - -# -# AddType allows you to add to or override the MIME configuration -# file mime.types for specific file types. -# -#AddType application/x-tar .tgz - -# -# AddEncoding allows you to have certain browsers uncompress -# information on the fly. Note: Not all browsers support this. -# Despite the name similarity, the following Add* directives have nothing -# to do with the FancyIndexing customization directives above. -# -#AddEncoding x-compress .Z -#AddEncoding x-gzip .gz .tgz - -# If the AddEncoding directives above are commented-out, then you -# probably should define those extensions to indicate media types: -# -AddType application/x-compress .Z -AddType application/x-gzip .gz -AddType application/x-tar-gz .tgz .msbk -AddType application/x-httpd-php .php -AddType application/x-httpd-php-source .phps - -# -# AddHandler allows you to map certain file extensions to "handlers": -# actions unrelated to filetype. These can be either built into the server -# or added with the Action directive (see below) -# -# To use CGI scripts outside of ScriptAliased directories: -# (You will also need to add "ExecCGI" to the "Options" directive.) -# -AddHandler cgi-script .cgi - -# -# For files that include their own HTTP headers: -# -#AddHandler send-as-is asis - -# -# For server-parsed imagemap files: -# -AddHandler imap-file map - -# -# For type maps (negotiated resources): -# (This is enabled by default to allow the Apache "It Worked" page -# to be distributed in multiple languages.) -# -AddHandler type-map var - -# -# Filters allow you to process content before it is sent to the client. -# -# To parse .shtml files for server-side includes (SSI): -# (You will also need to add "Includes" to the "Options" directive.) -# -AddType text/html .shtml -AddOutputFilter INCLUDES .shtml - -# -# Action lets you define media types that will execute a script whenever -# a matching file is called. This eliminates the need for repeated URL -# pathnames for oft-used CGI file processors. -# Format: Action media/type /cgi-script/location -# Format: Action handler-name /cgi-script/location -# - -# -# Customizable error responses come in three flavors: -# 1) plain text 2) local redirects 3) external redirects -# -# Some examples: -#ErrorDocument 500 "The server made a boo boo." -#ErrorDocument 404 /missing.html -#ErrorDocument 404 "/cgi-bin/missing_handler.pl" -#ErrorDocument 402 http://www.example.com/subscription_info.html -# - -# -# Putting this all together, we can internationalize error responses. -# -# We use Alias to redirect any /error/HTTP_.html.var response to -# our collection of by-error message multi-language collections. We use -# includes to substitute the appropriate text. -# -# You can modify the messages' appearance without changing any of the -# default HTTP_.html.var files by adding the line: -# -# Alias /error/include/ "/your/include/path/" -# -# which allows you to create your own set of files by starting with the -# /var/www/error/include/ files and -# copying them to /your/include/path/, even on a per-VirtualHost basis. -# - -Alias /error/ "/var/www/error/" - - - - - AllowOverride None - Options IncludesNoExec - AddOutputFilter Includes html - AddHandler type-map var - Order allow,deny - Allow from all - LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr - ForceLanguagePriority Prefer Fallback - - ErrorDocument 400 /error/400.html - ErrorDocument 401 /error/401.html - ErrorDocument 403 /error/403.html - ErrorDocument 404 /error/404.html - ErrorDocument 500 /error/500.html - ErrorDocument 503 /error/503.html - -# -# AllowOverride None -# Options IncludesNoExec -# AddOutputFilter Includes html -# AddHandler type-map var -# Order allow,deny -# Allow from all -# LanguagePriority en es de fr -# ForceLanguagePriority Prefer Fallback -# - -# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var -# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var -# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var -# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var -# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var -# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var -# ErrorDocument 410 /error/HTTP_GONE.html.var -# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var -# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var -# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var -# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var -# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var -# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var -# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var -# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var -# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var -# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var - - - - -# -# The following directives modify normal HTTP response behavior to -# handle known problems with browser implementations. -# -BrowserMatch "Mozilla/2" nokeepalive -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 -BrowserMatch "RealPlayer 4\.0" force-response-1.0 -BrowserMatch "Java/1\.0" force-response-1.0 -BrowserMatch "JDK/1\.0" force-response-1.0 - -# -# The following directive disables redirects on non-GET requests for -# a directory that does not include the trailing slash. This fixes a -# problem with Microsoft WebFolders which does not appropriately handle -# redirects for folders with DAV methods. -# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. -# -BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully -BrowserMatch "^WebDrive" redirect-carefully -BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully -BrowserMatch "^gnome-vfs" redirect-carefully - -# -# Allow server status reports generated by mod_status, -# with the URL of http://servername/server-status -# Change the ".example.com" to match your domain to enable. -# -# -# SetHandler server-status -# Order deny,allow -# Deny from all -# Allow from .example.com -# - -# -# Allow remote server configuration reports, with the URL of -# http://servername/server-info (requires that mod_info.c be loaded). -# Change the ".example.com" to match your domain to enable. -# -# -# SetHandler server-info -# Order deny,allow -# Deny from all -# Allow from .example.com -# - -# -# Proxy Server directives. Uncomment the following lines to -# enable the proxy server: -# -# -#ProxyRequests On -# -# -# Order deny,allow -# Deny from all -# Allow from .example.com -# - -# -# Enable/disable the handling of HTTP/1.1 "Via:" headers. -# ("Full" adds the server version; "Block" removes all outgoing Via: headers) -# Set to one of: Off | On | Full | Block -# -#ProxyVia On - -# -# To enable a cache of proxied content, uncomment the following lines. -# See http://httpd.apache.org/docs-2.0/mod/mod_cache.html for more details. -# -# -# CacheEnable disk / -# CacheRoot "/var/cache/mod_proxy" -# -# - -# -# End of proxy directives. - -### Section 3: Virtual Hosts -# -# VirtualHost: If you want to maintain multiple domains/hostnames on your -# machine you can setup VirtualHost containers for them. Most configurations -# use only name-based virtual hosts so the server doesn't need to worry about -# IP addresses. This is indicated by the asterisks in the directives below. -# -# Please see the documentation at -# -# for further details before you try to setup virtual hosts. -# -# You may use the command line option '-S' to verify your virtual host -# configuration. - -# -# Use name-based virtual hosting. -# -#NameVirtualHost *:80 -# -# NOTE: NameVirtualHost cannot be used without a port specifier -# (e.g. :80) if mod_ssl is being used, due to the nature of the -# SSL protocol. -# - -# -# VirtualHost example: -# Almost any Apache directive may go into a VirtualHost container. -# The first VirtualHost section is used for requests without a known -# server name. -# -# -# ServerAdmin webmaster@dummy-host.example.com -# DocumentRoot /www/docs/dummy-host.example.com -# ServerName dummy-host.example.com -# ErrorLog logs/dummy-host.example.com-error_log -# CustomLog logs/dummy-host.example.com-access_log common -# diff --git a/modules/apache/conf/mod_jk.conf b/modules/apache/conf/mod_jk.conf deleted file mode 100644 index dd33e5c8..00000000 --- a/modules/apache/conf/mod_jk.conf +++ /dev/null @@ -1,32 +0,0 @@ -JkWorkerProperty worker.list=tomcat -JkWorkerProperty worker.tomcat.type=ajp13 -JkWorkerProperty worker.tomcat.host=localhost -JkWorkerProperty worker.tomcat.port=8809 - -JkLogFile /etc/httpd/logs/mod_jk.log - -JkMountCopy All - -JkMount /MassBank/jsp tomcat -JkMount /MassBank/jsp/* tomcat -JkMount /MassBank/temp tomcat -JkMount /MassBank/temp/* tomcat -JkMount /MassBank/MultiDispatcher tomcat -JkMount /MassBank/MultiDispatcher/* tomcat -JkMount /MassBank/MassBankEnv tomcat -JkMount /MassBank/MassBankEnv/* tomcat -JkMount /MassBank/mbadmin tomcat -JkMount /MassBank/mbadmin/* tomcat -JkMount /api tomcat -JkMount /api/* tomcat - -JkMount /MassBank/pserver* tomcat -JkMount /MassBank/ServerMonitor* tomcat - -# -# Order deny,allow -# Deny from all -# Allow from localhost -# - - diff --git a/modules/apache/error/400.html b/modules/apache/error/400.html deleted file mode 100644 index e08035a2..00000000 --- a/modules/apache/error/400.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - -HTTP 400 Error - - -

HTTP 400 Error

-
-

-Bad Request.
-Your browser sent a request that this server could not understand.
-

-
- - - diff --git a/modules/apache/error/401.html b/modules/apache/error/401.html deleted file mode 100644 index 718c9e1a..00000000 --- a/modules/apache/error/401.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - -HTTP 401 Error - - -

HTTP 401 Error

-
-

-Authorization Required.
-This server could not verify that you are authorized to access the document requested.
-Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
-

-
- - - diff --git a/modules/apache/error/403.html b/modules/apache/error/403.html deleted file mode 100644 index b3e58870..00000000 --- a/modules/apache/error/403.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - -HTTP 403 Error - - -

HTTP 403 Error

-
-

-Forbidden.
-You don't have permission to access on this server.
-

-
- - - diff --git a/modules/apache/error/404.html b/modules/apache/error/404.html deleted file mode 100644 index 590ad398..00000000 --- a/modules/apache/error/404.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - -HTTP 404 Error - - -

HTTP 404 Error

-
-

-Document Not Found.
-The requested URL was not found on this server.
-

-
- - - diff --git a/modules/apache/error/500.html b/modules/apache/error/500.html deleted file mode 100644 index 97f89a34..00000000 --- a/modules/apache/error/500.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - -HTTP 500 Error - - -

HTTP 500 Error

-
-

-Internal Server Error.
-The server encountered an internal error or misconfiguration and was unable to complete your request.
-

-
- - - diff --git a/modules/apache/error/503.html b/modules/apache/error/503.html deleted file mode 100644 index 15adbef9..00000000 --- a/modules/apache/error/503.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - -HTTP 503 Error - - -

HTTP 503 Error

-
-

-Server Busy.
-Our service is not available now.
-Please revisit later.
-

-
- - - diff --git a/modules/apache/error/noindex.html b/modules/apache/error/noindex.html deleted file mode 100644 index b3e58870..00000000 --- a/modules/apache/error/noindex.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - -HTTP 403 Error - - -

HTTP 403 Error

-
-

-Forbidden.
-You don't have permission to access on this server.
-

-
- - - diff --git a/modules/apache/html/MassBank/.htaccess b/modules/apache/html/MassBank/.htaccess deleted file mode 100644 index e78fd8d8..00000000 --- a/modules/apache/html/MassBank/.htaccess +++ /dev/null @@ -1,13 +0,0 @@ -RewriteEngine on -RewriteRule ^$ jsp/index.jsp -RewriteRule ^index.html$ jsp/index.jsp -RewriteRule ^menu.html$ jsp/menu.jsp -RewriteRule ^SearchPage.html$ jsp/SearchPage.jsp -RewriteRule ^BrowsePage.html$ jsp/BrowsePage.jsp -RewriteRule ^QuickSearch.html$ jsp/QuickSearch.jsp -RewriteRule ^PeakSearch.html$ jsp/PeakSearch.jsp -RewriteRule ^PackageView.html$ jsp/PackageView.jsp -RewriteRule ^RecordIndex.html$ jsp/RecordIndex.jsp -RewriteRule ^StructureSearch.html$ jsp/StructureSearch.jsp -RewriteRule ^MassCalc.html$ jsp/MassCalc.jsp -RewriteRule ^api(.*)$ ../api$1 diff --git a/modules/apache/html/MassBank/StructureSearch/MassBank_filter.txt b/modules/apache/html/MassBank/StructureSearch/MassBank_filter.txt deleted file mode 100644 index cfca9886..00000000 --- a/modules/apache/html/MassBank/StructureSearch/MassBank_filter.txt +++ /dev/null @@ -1 +0,0 @@ -XX000001 diff --git a/modules/apache/html/MassBank/StructureSearch/atom.dat b/modules/apache/html/MassBank/StructureSearch/atom.dat deleted file mode 100644 index 00712928..00000000 --- a/modules/apache/html/MassBank/StructureSearch/atom.dat +++ /dev/null @@ -1,105 +0,0 @@ -104 -0 X 0 0 -1 H 1 1 -2 He 2 0 -3 Li 1 0 -4 Be 2 0 -5 B 3 0 -6 C 4 1 -7 N 5 1 -8 O 6 1 -9 F 7 1 -10 Ne 8 0 -11 Na 1 1 -12 Mg 2 1 -13 Al 3 0 -14 Si 4 0 -15 P 5 1 -16 S 6 1 -17 Cl 7 1 -18 Ar 8 0 -19 K 1 1 -20 Ca 2 0 -21 Sc 0 0 -22 Ti 0 0 -23 V 0 0 -24 Cr 0 0 -25 Mn 0 0 -26 Fe 0 1 -27 Co 0 1 -28 Ni 0 0 -29 Cu 0 0 -30 Zn 0 0 -31 Ga 0 0 -32 Ge 0 0 -33 As 0 0 -34 Se 0 0 -35 Br 7 1 -36 Kr 0 0 -37 Rb 0 0 -38 Sr 0 0 -39 Y 0 0 -40 Zr 0 0 -41 Nb 0 0 -42 Mo 0 0 -43 Tc 0 0 -44 Ru 0 0 -45 Rh 0 0 -46 Pd 0 0 -47 Ag 0 0 -48 Cd 0 0 -49 In 0 0 -50 Sn 0 0 -51 Sb 0 0 -52 Te 0 0 -53 I 0 0 -54 Xe 0 0 -55 Cs 0 0 -56 Ba 0 0 -57 La 0 0 -58 Ce 0 0 -59 Pr 0 0 -60 Nd 0 0 -61 Pm 0 0 -62 Sm 0 0 -63 Eu 0 0 -64 Gd 0 0 -65 Tb 0 0 -66 Dy 0 0 -67 Ho 0 0 -68 Er 0 0 -69 Tm 0 0 -70 Yb 0 0 -71 Lu 0 0 -72 Hf 0 0 -73 Ta 0 0 -74 W 0 0 -75 Re 0 0 -76 Os 0 0 -77 Ir 0 0 -78 Pt 0 0 -79 Au 0 0 -80 Hg 0 0 -81 Tl 0 0 -82 Pb 0 0 -83 Bi 0 0 -84 Po 0 0 -85 At 0 0 -86 Rn 0 0 -87 Fr 0 0 -88 Ra 0 0 -89 Ac 0 0 -90 Th 0 0 -91 Pa 0 0 -92 U 0 0 -93 Np 0 0 -94 Pu 0 0 -95 Am 0 0 -96 Cm 0 0 -97 Bk 0 0 -98 Cf 0 0 -99 Es 0 0 -100 Fm 0 0 -101 Md 0 0 -102 No 0 0 -103 Lr 0 0 diff --git a/modules/apache/html/MassBank/StructureSearch/logger.ini b/modules/apache/html/MassBank/StructureSearch/logger.ini deleted file mode 100644 index 463ee173..00000000 --- a/modules/apache/html/MassBank/StructureSearch/logger.ini +++ /dev/null @@ -1,2 +0,0 @@ -# INFO, DEBUG, WARN, ERROR -LOG_LEVEL=ERROR diff --git a/modules/apache/html/MassBank/StructureSearch/struct.dat b/modules/apache/html/MassBank/StructureSearch/struct.dat deleted file mode 100644 index 820d46f8..00000000 --- a/modules/apache/html/MassBank/StructureSearch/struct.dat +++ /dev/null @@ -1,111 +0,0 @@ -1 -XX000001 -0 -(null) -0 -(null) --1.762100 --0.324100 -1.482800 -0.803400 -3.244900 -1.127500 -7 -6 -0 -0.186200 --0.320700 -0.000000 -0 -2 -1 -0 -2 -1 -6 -0 -0.834500 -0.055200 -0.000000 -1 -3 -0 -0 -3 -2 -4 -3 -6 -0 --0.462100 -0.055200 -0.000000 -0 -2 -0 -1 -5 -4 -8 -0 -1.482800 --0.324100 -0.000000 -0 -1 -1 -2 -8 -0 -0.834500 -0.803400 -0.000000 -1 -1 -1 -3 -6 -0 --1.113800 --0.320700 -0.000000 -0 -2 -2 -4 -6 -5 -7 -0 --1.762100 -0.055200 -0.000000 -0 -1 -5 -5 -6 -1 -0 -0 -1 -1 -0 -0 -2 -1 -0 -1 -3 -2 -0 -1 -4 -1 -0 -2 -5 -1 -0 -5 -6 diff --git a/modules/apache/html/MassBank/StructureSearch/struct_server b/modules/apache/html/MassBank/StructureSearch/struct_server deleted file mode 100755 index e8f44823..00000000 Binary files a/modules/apache/html/MassBank/StructureSearch/struct_server and /dev/null differ diff --git a/modules/apache/html/MassBank/cgi-bin/CreateHeap.cgi b/modules/apache/html/MassBank/cgi-bin/CreateHeap.cgi deleted file mode 100755 index 50c12fab..00000000 --- a/modules/apache/html/MassBank/cgi-bin/CreateHeap.cgi +++ /dev/null @@ -1,178 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# ãƒ’ãƒ¼ãƒ—ãƒ†ãƒ¼ãƒ–ãƒ«ä½œæˆ -# -# ver 3.0.6 2012.09.24 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; -use File::Spec; -use File::Basename; - -#------------------------------------------------------------------------------- -# 指定ã—ãŸDBã®ãƒ’ープテーブルを作æˆã™ã‚‹ï¼ˆã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã§DBã®è¤‡æ•°æŒ‡å®šãŒå¯èƒ½ï¼‰ -# 例:CreateHeap.cgi?dsn=[db name],[db name],[db name]… -# -# dsnパラメータを未指定ã®å ´åˆã¯ã€massbank.confã®DBを対象ã«ãƒ’ープテーブルを作æˆã™ã‚‹ -# massbank.conf内ã§ã‚³ãƒ¡ãƒ³ãƒˆã‚¢ã‚¦ãƒˆã•ã‚ŒãŸDBã¯å¯¾è±¡å¤–ã¨ã™ã‚‹ -#------------------------------------------------------------------------------- - -print "Content-Type: text/plain\n\n"; - -my $query = new CGI; -my $massbank_dir = File::Spec->rel2abs( dirname($0) . "/../" ); - -# 処ç†å¯¾è±¡ã®DB一覧をå–å¾— -my @db_names = split(/,/, $query->param('dsn')); -if ( $#db_names < 0 ) { - open(MASSBANK_CONF, "$massbank_dir/massbank.conf"); - my $serverUrl = ""; - my $isCommentOut = 0; - my $isInternal = 0; - while ( my $line = ) { - $line =~ s/\r?\n?//g; # æ”¹è¡Œã‚³ãƒ¼ãƒ‰å¤‰æ› - - # 自サーãƒURLå–å¾— - if ($line =~ m||) { - $serverUrl = $1; - } - - # コメントアウト終了検出 - if ($isCommentOut == 1) { - if ($line !~ m|-->| || $line =~ m|| ) { - $isCommentOut = 0; - } - next; - } - - # サーãƒå†…部DB判定 - if ($line =~ m||) { - $isInternal = 1; - next; - } - if ($line =~ m|(.*)|) { - if ($serverUrl eq $1) { - $isInternal = 1; - } - else { - $isInternal = 0; - } - next; - } - - # サーãƒå†…部DBã‹ã¤ã€ã‚³ãƒ¡ãƒ³ãƒˆã‚¢ã‚¦ãƒˆã•ã‚Œã¦ã„ãªã„DBåã‚’å–å¾— - if ($isInternal == 1 && $line =~ m|(.*)| ) { - push (@db_names, $1); - $isInternal = 0; - } - } - close(MASSBANK_CONF); -} - -# DBホストåå–å¾— -my $host_name = ""; -open(F, "$massbank_dir/cgi-bin/DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -# MySQLãƒãƒ¼ã‚¸ãƒ§ãƒ³å–å¾— -($mysqlVer) = (`mysql --version` =~ /Distrib ([^\.]*\.[^\.]*)/); - -# ヒープテーブル作æˆSQL実行 -my $tbl_name = 'PEAK_HEAP'; -foreach my $db_name (@db_names) { - print "\n[$db_name]\n"; - - $DB = "DBI:mysql:$db_name:$host_name"; - $User = 'bird'; - $PassWord = 'bird2006'; - $dbh = DBI->connect($DB, $User, $PassWord) || next;#die "connect error \n"; - - $sql = "SHOW TABLES LIKE '$tbl_name'"; - @ret = mysql_query($sql); - if ( uc($ret[0][0]) eq "$tbl_name" ) { - $ret_name = $ret[0][0]; - $sql = "SELECT COUNT(*) FROM $ret_name"; - @ret = mysql_query($sql); - $heapCnt = $ret[0][0]; - $sql = "SELECT COUNT(*) FROM PEAK"; - @ret = mysql_query($sql); - $peakCnt = $ret[0][0]; - print "heapCnt=$heapCnt, peakCnt=$peakCnt"; - if ( $heapCnt == $peakCnt ) { - $dbh->disconnect; - print " --OK\n"; - next; - } - } - - $sql = "DROP TABLE IF EXISTS $tbl_name"; - mysql_execute($sql); - if ( $mysqlVer >= 5.2 || $mysqlVer eq "" ) { # MySQL5.2ã‹ã‚‰ã¯"TYPE="構文ãŒä½¿ç”¨ã§ããªã„ - $sql = "CREATE TABLE $tbl_name(INDEX(ID),INDEX(MZ),INDEX(RELATIVE)) " - . "ENGINE=InnoDB SELECT ID,MZ,RELATIVE FROM PEAK"; - } - else { - $sql = "CREATE TABLE $tbl_name(INDEX(ID),INDEX(MZ),INDEX(RELATIVE)) " - . "TYPE=InnoDB SELECT ID,MZ,RELATIVE FROM PEAK"; - } - mysql_execute($sql); - print " CREATE TABLE $tbl_name --OK\n"; - - $dbh->disconnect; -} -exit(0); - -sub mysql_query() { - local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute; - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish; - return @ret; -} - -sub mysql_execute() { - local($sql) = @_; - $sth = $dbh->prepare($sql); - $sth->execute; - $sth->finish; - return; -} diff --git a/modules/apache/html/MassBank/cgi-bin/DB_HOST_NAME b/modules/apache/html/MassBank/cgi-bin/DB_HOST_NAME deleted file mode 100644 index 7b9ad531..00000000 --- a/modules/apache/html/MassBank/cgi-bin/DB_HOST_NAME +++ /dev/null @@ -1 +0,0 @@ -127.0.0.1 diff --git a/modules/apache/html/MassBank/cgi-bin/Disp.cgi b/modules/apache/html/MassBank/cgi-bin/Disp.cgi deleted file mode 100755 index ee98e990..00000000 --- a/modules/apache/html/MassBank/cgi-bin/Disp.cgi +++ /dev/null @@ -1,753 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# レコードページ表示 @Record page display -# -# ver 3.0.30 2012.11.22 -# -#------------------------------------------------------------------------------- -%FMT = ( -'LICENSE:', 'https://creativecommons.org/licenses/', -'PUBLICATION:', 'http://www.ncbi.nlm.nih.gov/pubmed/%s?dopt=Citation', -'COMMENT: \[MSn\]', 'Dispatcher.jsp?type=disp&id=%s&site=%s', -'COMMENT: \[Merging\]', 'Dispatcher.jsp?type=disp&id=%s&site=%s', -'COMMENT: \[Merged\]', 'Dispatcher.jsp?type=disp&id=%s&site=%s', -'COMMENT: \[Mass spectrometry\]', '', -'COMMENT: \[Chromatography\]', '', -'COMMENT: \[Profile\]', '../DB/profile/%s/%s', -'COMMENT: \[Mixture\]', 'Dispatcher.jsp?type=disp&id=%s&site=%s', -'CH\$FORMULA:', 'http://www.chemspider.com/Search.aspx?q=%s', -'CH\$LINK: CAS', 'https://www.google.com/search?q="%s"', -'CH\$LINK: CAYMAN', 'http://www.caymanchem.com/app/template/Product.vm/catalog/%s', -'CH\$LINK: CHEBI', 'http://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:%s', -'CH\$LINK: CHEMPDB', 'http://www.ebi.ac.uk/msd-srv/chempdb/cgi-bin/cgi.pl?FUNCTION=getByCode&CODE=%s', -'CH\$LINK: CHEMSPIDER', 'http://www.chemspider.com/%s', -'CH\$LINK: COMPTOX', 'https://comptox.epa.gov/dashboard/dsstoxdb/results?search=%s', -'CH\$LINK: FLAVONOIDVIEWER', 'http://www.metabolome.jp/software/FlavonoidViewer/', -'CH\$LINK: HMDB', 'http://www.hmdb.ca/metabolites/%s', -'CH\$LINK: INCHIKEY', 'https://www.google.com/search?q="%s"', -'CH\$LINK: KAPPAVIEW', 'http://kpv.kazusa.or.jp/kpv4/compoundInformation/view.action?id=%s', -'CH\$LINK: KEGG', 'http://www.genome.jp/dbget-bin/www_bget?%s:%s', -'CH\$LINK: KNAPSACK', 'http://kanaya.naist.jp/knapsack_jsp/info.jsp?sname=C_ID&word=%s', -'CH\$LINK: LIPIDBANK', 'http://lipidbank.jp/cgi-bin/detail.cgi?id=%s', -'CH\$LINK: LIPIDMAPS', 'http://www.lipidmaps.org/data/get_lm_lipids_dbgif.php?LM_ID=%s', -'CH\$LINK: NIKKAJI', 'http://nikkajiweb.jst.go.jp/nikkaji_web/pages/top.jsp?SN=%s&CONTENT=syosai', -'CH\$LINK: PUBCHEM', 'http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?', -'CH\$LINK: OligosaccharideDataBase', 'http://www.fukuyama-u.ac.jp/life/bio/biochem/%s.html%s', -'CH\$LINK: OligosaccharideDataBase2D', 'http://www.fukuyama-u.ac.jp/life/bio/biochem/%s.html', -'SP\$LINK: NCBI-TAXONOMY', 'http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=%s', -'SP\$SAMPLE: LOCATION', 'https://www.ebi.ac.uk/ontology-lookup/?termId=%s', -'MS\$RELATED_MS: PREVIOUS_SPECTRUM', 'Dispatcher.jsp?type=disp&id=%s', -#'PK\$SPLASH:', 'https://www.google.com/search?q="%s"' -'PK\$SPLASH:', 'http://mona.fiehnlab.ucdavis.edu/#/spectra/splash/%s' -); - -use CGI; -use DBI; - -print "Content-Type: text/html; charset=utf-8\n\n"; - -$query = new CGI; -@params = $query->param(); -foreach my $key ( @params ) { - $val = $query->param($key); - $Arg{$key} = $val; - if ( $key eq 'type' ) { - $type = $val; - } - elsif ( $key eq 'dsn' ) { - $db_name = $val; - } -} - -# get my server url -my $url = $query->url; -my $myServer = substr($url, 0, index($url, "/cgi-bin")); -open(F, "../massbank.conf"); -while ( ) { - if ( index($_, "FrontServer") != -1 ) { - $myServer = $_; - $myServer =~ s/.*"(.*)".*/$1/g; - $myServer =~ s/\r?\n?//g; - if ( $myServer !~ m|/$|o ) { - $myServer .= "/"; - } - last; - } -} -close(F); - -$id = $Arg{'id'}; -$src = $Arg{'src'}; -$mz_num = $Arg{'num'}; -if ( $src eq '' ) { - $src = 0; -} -$qmz = $Arg{'qmz'}; -$cutoff = $Arg{'CUTOFF'}; -$nloss = $Arg{'nloss'}; -$product = $Arg{'product'}; -$mode = $Arg{'mode'}; - -$DB = "../DB/annotation/$db_name"; -$file_path = "$DB/$id.txt"; -unless ( -f $file_path ) { - print "Content-Type: text/html; charset=utf-8\n\n"; - exit(0); -} -open(F, $file_path); - -my $acc = ""; -my $name = ""; -my $version = 1; -while ( ) { - s/\r?\n?//g; - push(@Line, $_); - if ( /^ACCESSION: / ) { s/^ACCESSION: //; $acc = $_; } - elsif ( /^RECORD_TITLE: / ) { s/^RECORD_TITLE: //; $name = $_; } - elsif ( /^LICENSE: / ) { $version = 2; } -} - -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - s/\r?\n?//g; - $host_name .= $_; -} - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || &myexit; -@ans = &MySql("select PRECURSOR_MZ from SPECTRUM where ID = '$acc'"); -$precursor = $ans[0][0]; -$short_name = substr( $name, 0, index($name, ';') ); -$str_merge = ""; -if ( index($name, "MERGED") != -1 ) { - $str_merge = " MERGED SPECTRUM "; -} - -print << "HTML"; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $short_name Mass Spectrum - - - - - - -
-

MassBank Record: $acc $str_merge

-
- -
-
-  $name  -
-HTML - -$height = 200; -$param = ""; -if ( $mz_num ne '' ) { - #------------------------ - # Peak Difference Search - #------------------------ - if ( $type eq 'dispdiff' ) { - $max_cnt = 0; - $hit = 0; - $param = "\t\t\t\n"; - for ( $i = 0; $i < $mz_num; $i++ ) { - $mz = $Arg{"mz$i"} + 0; - last if ( $mz eq 0 ); - $tol = $Arg{"tol$i"} + 0; - $tol = - $tol if ( $tol < 0 ); - $min = $mz - $tol - 0.00001; - $max = $mz + $tol + 0.00001; - $val = $Arg{"int$i"} + 0; - $sql = "select t2.MZ, t1.MZ from PEAK as t1 left join PEAK as t2 on t1.ID = t2.ID " - . "where t1.ID = '$id' and (t1.MZ between t2.MZ + $min and t2.MZ + $max) " - . "and t1.RELATIVE > $val and t2.RELATIVE > $val"; - @ans = &MySql($sql); - $rec_num = @ans; - next if ( $rec_num == 0 ); - $hit++; - $out_mz = ""; - $cnt = 0; - $mz1_prev = 0; - $mz2_prev = 0; - for $item ( @ans ) { - $mz1 = $$item[0]; - $mz2 = $$item[1]; - if ( $mz1 >= $mz1_prev + 1 && $mz2 >= $mz2_prev + 1 ) { - $cnt++; - } - $out_mz .= "$mz1,$mz2@"; - $mz1_prev = $mz1; - $mz2_prev = $mz2; - } - $max_cnt = $cnt if ( $cnt > $max_cnt ); - $pnum = $i+1; - $param .= "\t\t\t\n"; - $param .= "\t\t\t\n"; - } - $param .= "\t\t\t\n"; - $height += 12 * $max_cnt; - $mz_num = $hit; - } - #------------------------ - # Peak Search - #------------------------ - else { - $param = "\t\t\t\n"; - $where = " and ("; - for ( $i = 0; $i < $mz_num; $i++ ) { - $mz = $Arg{"mz$i"} + 0; - last if ( $mz eq 0 ); - $tol = $Arg{"tol$i"} + 0; - $tol = - $tol if ( $tol < 0 ); - $min = $mz - $tol - 0.00001; - $max = $mz + $tol + 0.00001; - $val = $Arg{"int$i"} + 0; - $where .= "(MZ between $min and $max and RELATIVE > $val)"; - if ( $i < $mz_num - 1 ) { - $where .= " or "; - } - } - $where .= ")"; - $sql = "select MZ from PEAK where ID='$id'" . $where; - @ans = &MySql($sql); - $rec_num = @ans; - $out_mz = ""; - for $item ( @ans ) { - $out_mz .= "$$item[0]@"; - } - chop $out_mz; - $param .= "\t\t\t\n"; - $mz_num = "1"; - } -} - -#------------------------ -# Quick Search by Peak -#------------------------ -if ( $qmz ne '' ) { - @mzs = split(',', $qmz); - my $cnt = @mzs; - for ( $i = 0; $i < $cnt; $i++ ) { - $mz = $mzs[$i]; - $min = $mz - 0.3 - 0.00001; - $max = $mz + 0.3 + 0.00001; - $range .= "(MZ between $min and $max)"; - $in .= "ROUND($mz,3)"; - if ( $i < $cnt - 1 ) { - $range .= " or "; - $in .= ","; - } - } - $sql = "select MZ from PEAK where ID='$id' and RELATIVE > $cutoff and ROUND(MZ,3) in($in)"; - @ans = &MySql($sql); - for $item ( @ans ) { - $out_mz .= "$$item[0]@"; - } - - $sql = "select distinct(MZ) from PEAK where ID='$id' and RELATIVE > $cutoff and ($range)"; - @ans = &MySql($sql); - for $item ( @ans ) { - $out_mz2 .= "$$item[0]@"; - } - - $param .= "\t\t\t\n"; - $param .= "\t\t\t\n"; - if ( $out_mz ne '' ) { - $param .= "\t\t\t\n"; - $mz_num = "2"; - } - else { - $mz_num = "1"; - } -} -#------------------------ -# Product Ion -#------------------------ -elsif ( $product ne '' ) { - my @formula_list = split(",", $product); - @formula_list = grep {!$count{$_}++} @formula_list; # é‡è¤‡å‰Šé™¤ @Delete duplicates - $mz_num = scalar(@formula_list); - $param = "\t\t\t\t\t\t\n"; - my $cnt = 1; - for my $formula ( @formula_list ) { - my $mz = &MassCalc($formula); - my $val ="$mz,$formula"; - $param .= "\t\t\t\t\t\t\n"; - $cnt++; - } -} -#------------------------ -# Neutral Loss -#------------------------ -elsif ( $nloss ne '' ) { - my @formula_list = split(",", $nloss); - #-------------------- - # SEQUENCE - #-------------------- - if ( $mode eq 'seq' ) { - my $like = ""; - foreach my $formula ( @formula_list ){ - if ( $formula ne '' ) { - $like .= "%>$formula-"; - } - } - $like .= "%"; - $where = "PATH like '$like'"; - $sql = "select PATH, PP_NO from NEUTRAL_LOSS_PATH where ID='$id' and $where"; -# print "SQL:$sql
"; - my @ans = &MySql($sql); - my @path_items = (); - my @ppno_items = (); - my @hit_ppno = (); - for my $item ( @ans ) { - my $path = $$item[0]; - my $ppno = $$item[1]; - $path = substr($path, 1, length($path)-2); - @path_items = split("->", $path); - @ppno_items = split(",", $ppno); - for my $l1 ( 0 .. $#path_items ) { - for my $l2 ( 0 .. $#formula_list ) { - if ( $path_items[$l1] eq $formula_list[$l2] ) { - push(@hit_ppno, @ppno_items[$l1]); - last; - } - } - } - } - @hit_ppno = grep {!$count{$_}++} @hit_ppno; # é‡è¤‡å‰Šé™¤ @Delete duplicates - my $ppno = join(",", @hit_ppno); - $where = "and NO in($ppno)"; - } - #-------------------- - # AND - #-------------------- - elsif ( $mode eq 'and' ) { - my @sql_formula_list = (); - @formula_list = sort(grep {!$count{$_}++} @formula_list); # é‡è¤‡å‰Šé™¤ @Delete duplicates - for my $i ( 0 .. $#formula_list ) { - push(@sql_formula_list, "'" . $formula_list[$i] . "'"); - } - $in = join(",", @sql_formula_list ); - $where = "and NEUTRAL_LOSS in($in)"; - } - $sql = "select PRECURSOR, PRODUCT, NEUTRAL_LOSS from PRE_PRO where ID='$id' " - . $where . " order by NEUTRAL_LOSS"; -# print "SQL:$sql
"; - my @ans = &MySql($sql); - - # アプレットã®ãƒ‘ラメータをセットã™ã‚‹ - $mz_num = scalar(@ans); - $param = "\t\t\t\t\t\t\n"; - my $cnt = 1; - for my $item ( @ans ) { - my $pre_mz = &MassCalc($$item[0]); # プレカーサイオンを数値ã«å¤‰æ› @Numeric conversion of the precursor ion - my $pro_mz = &MassCalc($$item[1]); # プロダクトイオンを数値ã«å¤‰æ› @Numerice conversion of the product ion - my $nloss = $$item[2]; # ニュートラルロス分å­å¼ @Neutral loss molecular formula - my $val ="$pro_mz,$pre_mz,$nloss"; - $param .= "\t\t\t\t\t\t\n"; - $cnt++; - } - $height += 12 * $cnt; -} - - -print << "HTML"; - - - - - -
- Mass Spectrum -HTML - -if ( $version == 1 ) { - $profile = "../DB/profile/$db_name/$acc.jpg"; - if ( -e $profile ) { - print "      Profile"; - } -} - -print << "HTML"; -
-
-HTML - -print << "HTML"; -
- Chemical Structure
-HTML - -# Chemical Structure -@compound_name = split(';', $name); -$cond = $compound_name[0]; -$cond =~ s/"/""/g; -$sql = "SELECT FILE FROM MOLFILE WHERE NAME=\"$cond\""; -@ans = &MySql($sql); -$gifId = $ans[0][0]; -$gifFile = "../DB/gif/$db_name/$gifId.gif"; -$gifUrl = "$myServer"."DB/gif/$db_name/$gifId.gif"; -$gifLargeFile = "../DB/gif_large/$db_name/$gifId.gif"; -$gifLargeUrl = "$myServer"."DB/gif_large/$db_name/$gifId.gif"; -if ( -f $gifFile ) { - if ( ! -f $gifLargeFile ) { - $gifLargeUrl = "../image/not_available_l.gif"; - } - print "\t\t\t\t\t\"\"
\n"; -} -else { -print << "HTML"; -
-HTML -} - -print << "HTML"; -
-HTML - - -print "
\n"; -print "
\n";
-
-my @boundary = ( 'CH\$', 'AC\$', 'PK\$' );
-my $num = @boundary;
-my $step = 0;
-my $isRelated = false;
-my $isSpBoundary = false;
-my $isMsBoundary = false;
-foreach my $l ( @Line ) {
-	if ( $step < $num && $l =~ /^$boundary[$step]/ ) {
-		print "
"; - $step++; - } - if ( $isSpBoundary eq false && $l =~ /^SP\$/ ) { - print "
"; - $isSpBoundary = true; - } - if ( $isMsBoundary eq false && $l =~ /^MS\$/ ) { - print "
"; - $isMsBoundary = true; - } - if ( $l =~ /^RELATED_RECORD/ ) { - print "
"; - print "$l\n"; - $isRelated = true; - next; - } - if ( $isRelated eq true ) { - if ( substr($l,1,1) ne "*" ) { - my $tmpVal = $l; - $tmpVal =~ s/^\s*(.*?)\s*$/$1/; # Trim - $pos = index($tmpVal,' '); - if ( $pos >= 0 ) { - $id = substr($tmpVal, 0, $pos ); - $name = substr($tmpVal, $pos + 1 ); - $url = "./Dispatcher.jsp?type=disp&id=$id&site=$src"; - print "  $id $name\n"; - next; - } - } - } - - my $item_name = ''; - my $val = ''; - my @vals = (); - my $array_key = ''; - foreach my $key ( keys %FMT ) { - if ( $l =~ /^COMMENT: \[MS[0-9]*\] / && $key eq 'COMMENT: \[MSn\]') { - ($val = $l) =~ s/^COMMENT: \[MS[0-9]*\] //; - @vals = split('\s', $val); - $array_key = $key; - ($item_name = $l) =~ s/^(COMMENT: \[MS[0-9]*\]) .*/$1/; - last; - } - elsif ( $l =~ /^$key/ ) { - ($val = $l) =~ s/^$key //; - @vals = split('\s', $val); - $array_key = $key; - ($item_name = $key) =~ s/\\//g; - last; - } - } - if ( $val eq '' ) { - print "$l\n"; - } - else { - print "$item_name"; - if ( $array_key eq 'LICENSE:' ) { - ($cc) = ($val =~ m/(CC [^ ]*)/o); - if ( $cc ne '' ) { - $url = $FMT{$array_key}; - if ( index($ENV{'HTTP_ACCEPT_LANGUAGE'}, 'ja') != -1 ) { - $url =~ s/\.org/\.jp/o; - } - $val =~ s/$cc//o; - $val =~ s/^\s*(.*?)\s*$/$1/; - $val = "$cc".($val ne "" ? " $val" : ""); - } - else { - ($otherLink) = ($val =~ m/(http:\/\/[^ ]*)/); - if ( $otherLink ne '' ) { - $val =~ s/$otherLink//o; - $val =~ s/^\s*(.*?)\s*$/$1/; - $val = "$otherLink".($val ne "" ? " $val" : ""); - } - } - print " $val"; - } - elsif ( $array_key eq 'PUBLICATION:' ) { - ($pmid) = ($val =~ m/\[PMID:\s(.*)\]/o); - if ( $pmid ne '' ) { - $url = sprintf( $FMT{$array_key}, $pmid ); - $link = "$pmid"; - $val =~ s/\[PMID:.*\]/\[PMID: $link\]/o; - } - print " $val"; - } - elsif ( index($array_key, 'COMMENT:') != -1 ) { - $link_id = $vals[0]; - if ( $array_key ne 'COMMENT: \[Profile\]' ) { - $url = sprintf( $FMT{$array_key}, $link_id, $src ); - } - else { - $url = sprintf( $FMT{$array_key}, $db_name, $link_id ); - } - if ( $url ne "" ) { - $link = "$link_id"; - $val =~ s/$link_id/$link/; - } - print " $val"; - } - elsif ( index($array_key, 'CH\$LINK: OligosaccharideDataBase') == -1 ) { - foreach $val ( @vals ) { - $comment = ""; - if ( $array_key eq 'CH\$LINK: PUBCHEM' ) { - @id = split( ':', $val ); - $id_num = @id; - if ( $id_num == 1 ) { - $number = $id[0]; - $pname = ''; - print " "; - } - else { - print " $id[0]:"; - $number = $id[1]; - $pname = lc($id[0]); - } - if ( $pname eq '' ) { - $url = "$FMT{$array_key}sid=$number"; - } - else { - $url = "$FMT{$array_key}$pname=$number"; - } - } - else { - $pos = index( $val, '(' ); - if ( $pos >= 0 ) { - $comment = substr( $val, $pos, length($val)-$pos ); - $val = substr( $val, 0, $pos ); - } - if ( $array_key eq 'CH\$LINK: KEGG' ) { - if ( substr($val, 0, 1) eq 'G' ) { - $pre = "gl"; - } - elsif ( substr($val, 0, 1) eq 'D' ) { - $pre = "dr"; - } - else { - $pre = "cpd"; - } - $url = sprintf( $FMT{$array_key}, $pre, $val ); - } - else { - $url = sprintf( $FMT{$array_key}, $val ); - } - if ( $array_key eq 'MS\$RELATED_MS: PREVIOUS_SPECTRUM' ) { - $url .= "&site=$src"; - } - $number = $val; - print " "; - } - print "$number"; - if ( $comment ne '' ) { - print $comment; - } - } - } - else { - my $vals_length = @vals; - print " "; - if ( $array_key eq 'CH\$LINK: OligosaccharideDataBase' ) { - if ( $vals_length > 0 ) { - $htmlId = $vals[0]; - } - if ( $vals_length > 1 ) { - $link = $vals[1]; - $url = sprintf( $FMT{$array_key}, $htmlId, "#anchor$link" ); - } - print "$htmlId $link"; - } - elsif ( $array_key eq 'CH\$LINK: OligosaccharideDataBase2D' ) { - if ( $vals_length >= 1 ) { - $htmlId = $vals[0]; - shift(@vals); - $url = sprintf( $FMT{$array_key}, $htmlId ); - } - print "$htmlId @vals"; - } - } - print "\n"; - } -} - -$dbh->disconnect; -&myexit; - -sub myexit() { -print << "HTML"; -
-
- - - -HTML -exit(0); -} - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || &myexit; - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} - -sub MassCalc() { - %mass_list = ("H" => 1.007825032, "Be" => 9.0121821, "B" => 11.0093055, "C" => 12.00000000, - "N" => 14.003074005, "O" => 15.994914622, "F" => 18.99840320, "Na" => 22.98976967, - "Al" => 26.98153844, "Si" => 27.976926533, "P" => 30.97376151, "S" => 31.97207069, - "Cl" => 34.96885271, "V" => 50.9439637, "Cr" => 51.9405119, "Fe" => 55.9349421, - "Ni" => 57.9353479, "Co" => 58.9332001, "Cu" => 62.9296011, "Zn" => 63.9291466, - "Ge" => 73.9211782, "Br" => 78.9183376, "Mo" => 97.9054078, "Pd" => 105.903483, - "I" => 126.904468, "Sn" => 119.9021966, "Pt" => 194.964774, "Hg" => 201.970626 ); - - my $formula = shift; - my @atom_list = &GetAtomList($formula); - my $mass = 0; - foreach my $atom_num (@atom_list) { - my @item = split(':', $atom_num); - my $atom = $item[0]; - my $num = $item[1]; - $mass += $mass_list{$atom} * $num; - } - $mass = int(($mass * 1000) + 0.5) / 1000; - return $mass; -} - -sub GetAtomList() { - my $formula = shift; - my @atom_list = (); - my $start_pos = 0; - my $end_pos = length($formula); - - for ( my $pos = $start_pos; $pos <= $end_pos; $pos++ ) { - my $chr = ""; - if ( $pos < $end_pos ) { - $chr = substr( $formula, $pos, 1 ); - } - if ( $pos == $end_pos || ($pos > 0 && $chr =~ /[\D]/ && $chr eq uc($chr)) ) { - # å…ƒç´ è¨˜å· + 個数を切り出㙠@Cutting out the element symbol + number - my $item = substr( $formula, $start_pos, $pos - $start_pos ); - - # 元素記å·ã¨å€‹æ•°ã‚’分解 - my $isFound = false; - $pos1 = length($item); - for ( my $i = 1; $i < length($item); $i++ ) { - $chr = substr( $item, $i, 1 ); - if ( $chr =~ /[\d]/ ) { - $pos1 = $i; - $isFound = true; - last; - } - } - - my $atom = substr($item, 0, $pos1); - my $num = 1; - if ( $isFound eq true ) { - $num = substr($item, $pos1); - } - - # 元素ãŒåŒã˜å ´åˆ - if ( $atom_list{$atom} ne '' ) { - $num = $num + $atom_list{$atom}; - } - - # å€¤æ ¼ç´ - push(@atom_list, "$atom:$num"); - $start_pos = $pos; - } - } - return @atom_list; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/ExistRecord.cgi b/modules/apache/html/MassBank/cgi-bin/ExistRecord.cgi deleted file mode 100755 index 0c2d6619..00000000 --- a/modules/apache/html/MassBank/cgi-bin/ExistRecord.cgi +++ /dev/null @@ -1,59 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# レコード存在ãƒã‚§ãƒƒã‚¯ -# -# ver 3.0.1 2008.12.05 -# -#------------------------------------------------------------------------------- -use DBI; -use CGI; - -$query = new CGI; -$id = $query->param('id'); -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -$DB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($DB, $User, $PassWord) || die "connect error \n"; -$sql = "select ID from SPECTRUM where ID='$id'"; -$sth = $dbh->prepare($sql); -unless( $sth->execute ) { - exit(0); -} -$rows = $sth->rows; -if ( $rows >= 1 ) { - print $id; -} -$sth->finish; -$dbh->disconnect; -exit(0); diff --git a/modules/apache/html/MassBank/cgi-bin/GenMergeRecord.cgi b/modules/apache/html/MassBank/cgi-bin/GenMergeRecord.cgi deleted file mode 100755 index 18d821ab..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GenMergeRecord.cgi +++ /dev/null @@ -1,345 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] çµ±åˆã‚¹ãƒšã‚¯ãƒˆãƒ«ç”Ÿæˆ -# (レコードファイル, MERGE.sql, UPADTE.sql) -# -# ver 1.0.2 2010.09.16 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; -use POSIX 'strftime'; -use File::Path; - -print "Content-Type: text/plain\n\n"; - -$query = new CGI; -my $out_dir = $query->param('out_dir'); -my $db_name = $query->param('db'); -my $ids = $query->param('id'); -my @target_ids = split(',' , $ids); -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || &myexit; - -#------------------------------------------------------ -# çµ±åˆã‚¹ãƒšã‚¯ãƒˆãƒ«ã®æœ€çµ‚IDã‚’å–å¾— -#------------------------------------------------------ -my $sql = "select max(ID) from SPECTRUM"; -my @ans = &MySql($sql); -my $id = $ans[0][0]; -my $sql = "select ifnull(max(ID),0) from SPECTRUM where NAME like '%MERGED%'"; -my @ans = &MySql($sql); -my $max_id = $ans[0][0]; -my $prefix = substr($id, 0, 2); -local $last_no = substr($max_id, 3) + 1; - -$out_dir = "$out_dir/$db_name"; -mkpath($out_dir); -open(FS, ">$out_dir/$db_name" . "_MERGED.sql"); -open(FU, ">$out_dir/$db_name" . "_UPADTE.sql"); -print FS "START TRANSACTION;\n"; -print FU "START TRANSACTION;\n"; - -#------------------------------------------------------ -# 化åˆç‰©åリストをå–å¾— -#------------------------------------------------------ -my $sql = "select substring_index(NAME,';',2) as XNAME from SPECTRUM group by XNAME order by ID"; -my @ans0 = &MySql($sql); - -my ($id, $get_record_name, $get_ion, $get_ion_type, $get_xname); -local ($record_name, $ion, $ion_type, $formula, $mass, $inst_no, $smiles, $iupac, $xname); -local (@group_id, @group_title, $merge_id); -local $date = strftime "%Y.%m.%d", localtime; - -for my $rs0 ( @ans0 ) { - my $name = $$rs0[0]; - $name =~ s/\'/\\\'/g; - - #------------------------------------------------------ - # åŒä¸€åŒ–åˆç‰©åã®ã‚‚ã®ã‚’グループ化ã—〠- # グループ内ã§ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚¿ã‚¤ãƒˆãƒ«é †ã«ã‚½ãƒ¼ãƒˆã™ã‚‹ - #------------------------------------------------------ - $sql = "select S.ID, NAME, ION, substring(NAME,instr(NAME,'[M')) as ION_TYPE," - . " FORMULA, EXACT_MASS, INSTRUMENT_NO, SMILES, IUPAC," - . " concat(substring_index(NAME,';',2), substring(NAME,instr(NAME,'[M'))) as XNAME" - . " from SPECTRUM S, RECORD R where substring_index(NAME,';',2) = '$name'" - . " and S.ID = R.ID order by XNAME desc"; - my @ans = &MySql($sql); - - for my $rs ( @ans ) { - $id = $$rs[0]; - my $isFound = false; - - #------------------------------------------------------ - # 処ç†å¯¾è±¡å¤–IDã®å ´åˆã¯ã€ä»¥é™ã®å‡¦ç†ã¯è¡Œã‚ãªã„ - #------------------------------------------------------ - for my $target_id (@target_ids) { - if ( $id eq $target_id ) { - $isFound = true; - break; - } - } - if ( $isFound eq false ) { - next; - } - - $get_record_name = $$rs[1]; - $get_ion = $$rs[2]; - $get_ion_type = $$rs[3]; - $get_xname = $$rs[9]; - #------------------------------------------------------ - # レコードåã‹ã‚‰åŒ–åˆç‰©åã‚’å–り出㙠- #------------------------------------------------------ - my @short_name = split(";", $get_record_name); - my $compound_name = $short_name[0]; - - #------------------------------------------------------ - # åŒä¸€åŒ–åˆç‰©åã§ã‚‚別レコードã«ãªã‚‹ã‹ã‚’ION TYPEã«ã¦åˆ¤åˆ¥ - #------------------------------------------------------ - my $isChange = false; - if ( $xname eq '' ) { - $isChange = false; - } - elsif ( $get_xname ne $xname ) { - $isChange = true; - } - else { - if ( $get_ion_type eq '' ) { - if ( $get_ion ne $ion ) { - $isChange = true; - } - } - else { - if ( $get_ion_type ne $ion_type ) { - $isChange = true; - } - } - } - - if ( $isChange eq true ) { - &makeRecordFile(); - @group_id = (); - @group_title = (); - } - $record_name = $$rs[1]; - $ion = $$rs[2]; - $ion_type = $$rs[3]; - $formula = $$rs[4]; - $mass = $$rs[5]; - $inst_no = $$rs[6]; - $smiles = $$rs[7]; - $iupac = $$rs[8]; - $xname = $$rs[9]; - - push(@group_id, $id); - push(@group_title, $record_name); - } -} -&makeRecordFile(); - -print FS "COMMIT;\n"; -print FU "COMMIT;\n"; -close(FS); -close(FU); -print "Content-Type: text/plain\n\n"; -print "OK\n"; -exit(0); - - -sub makeRecordFile() { - my ($sql, $rs, @ans); - my $id = $group_id[0]; - $merge_id = $prefix . substr("X00000", 0, 6 - length($last_no)) . $last_no++; - - my @short_name = split(";", $record_name); - my $inst = trim($short_name[1]); - my $del_arry_num = 0; - if ( $inst eq "MS/MS" - || $inst eq "LC-MS/MS" - || $inst eq "LC-Q/MS" ) { - # QqQ-MS, QqTOF, LC-QqQ, LC-Q - $del_arry_num = 3; - } - else { - # LC-TOF, GC-TOF, CE-TOF - $del_arry_num = -1; - } - - #------------------------------------------------------ - # ãƒ¬ã‚³ãƒ¼ãƒ‰ãƒ•ã‚¡ã‚¤ãƒ«ç”Ÿæˆ - #------------------------------------------------------ - open(F, ">$out_dir/" . $merge_id . ".txt"); - #-- ACCESSION ----------------------------------------- - print F "ACCESSION: $merge_id\n"; - - #-- RECORD_TITLE -------------------------------------- - my $compound_name = $short_name[0]; - my $record_name = "$compound_name;"; - for my $i ( 1 .. $#short_name ) { - if ( $i == $del_arry_num ) { - $record_name .= " MERGED;"; - } - else { - $record_name .= "$short_name[$i];"; - } - } - chop $record_name; - print F "RECORD_TITLE: $record_name\n"; - - #-- 日付 ---------------------------------------------- - print F "DATE: $date\n"; - - #-- 化åˆç‰©æƒ…å ± ---------------------------------------- - $sql = "select NAME from CH_NAME where ID = '$id' order by NAME"; - @ans = &MySql($sql); - my @ch_name = (); - for $rs ( @ans ) { - my $name = $$rs[0]; - print F "CH\$NAME: $name\n"; - $name =~ s/'/''/g; - push(@ch_name, "('$merge_id','$name')"); - } - print F "CH\$FORMULA: $formula\n"; - print F "CH\$EXACT_MASS: $mass\n"; - print F "CH\$SMILES: $smiles\n"; - print F "CH\$IUPAC: $iupac\n"; - - #-- CH_LINK -------------------------------------------- - my @item_name = ( - "CAS", "CHEBI", "CHEMPDB", "KEGG", "NIKKAJI", "PUBCHEM" - ); - my $col_name = join(",", @item_name); - $sql = "select $col_name from CH_LINK where ID = '$id'"; - @ans = &MySql($sql); - my @ch_link = (); - for my $i ( 0 .. $#{$ans[0]} ) { - my $link = $ans[0][$i]; - push(@ch_link, "'$link'"); - if ( $link ne '' ) { - print F "CH\$LINK: $item_name[$i] $link\n"; - } - } - - #-- çµ±åˆå…ƒã‚¹ãƒšã‚¯ãƒˆãƒ«ã®æƒ…å ± ---------------------------- - my @related = (); - for $i ( 0 .. $#group_id ) { - my $str = "$group_id[$i] $group_title[$i]"; - push(@related, $str); - } - print F "RELATED_RECORD:\n"; - foreach my $str ( sort(@related) ) { - print F " $str\n"; - } - print F "//\n"; - close(F); - - #------------------------------------------------------ - # SPECTRUMテーブルUPDATE SQL - #------------------------------------------------------ - foreach my $child_id ( sort(@group_id) ) { - print FU "update SPECTRUM set PARENT_ID='$merge_id' where ID ='$child_id';\n"; - } - - #------------------------------------------------------ - # SPECTRUMテーブルINSERT SQL - #------------------------------------------------------ - $record_name =~ s/'/''/g; - $sql = "insert into SPECTRUM(ID,NAME,ION) " - . "values('$merge_id','$record_name',$ion);"; - print FS "$sql\n"; - - #------------------------------------------------------ - # PEAKテーブルINSERT SQL - #------------------------------------------------------ - my $in = ""; - for my $gid (@group_id) { - $in .= "'$gid',"; - } - chop $in; - $sql = "select MZ, max(INTENSITY) from PEAK where ID in($in) group by MZ order by MZ"; - @ans = &MySql($sql); - my $max_inte = 0; - for $rs ( @ans ) { - my $inte = $$rs[1]; - if ( $inte > $max_inte ) { - $max_inte = $inte; - } - } - my $val = ""; - for $rs ( @ans ) { - my $mz = $$rs[0]; - my $inte = $$rs[1]; - my $rel = int(($inte / $max_inte * 999) + 0.5); - if ( $rel == 0 ) { - $rel = 1; - } - $val .= "('$merge_id',$mz,$inte,$rel),"; - } - chop $val; - $sql = "insert into PEAK values$val;"; - print FS "$sql\n"; - - #------------------------------------------------------ - # RECORDテーブルINSERT SQL - #------------------------------------------------------ - $sql = "insert into RECORD(ID,DATE,FORMULA,EXACT_MASS,INSTRUMENT_NO,SMILES,IUPAC) " - . "values('$merge_id','$date','$formula',$mass,$inst_no,'$smules','$iupac');"; - print FS "$sql\n"; - - #------------------------------------------------------ - # CH_NAMEテーブルINSERT SQL - #------------------------------------------------------ - my $col_val = join(",", @ch_name); - $sql = "insert into CH_NAME values$col_val;"; - print FS "$sql\n"; - - #------------------------------------------------------ - # CH_LINKテーブルINSERT SQL - #------------------------------------------------------ - $col_val = join(",", @ch_link); - $sql = "insert into CH_LINK(ID,$col_name) values('$merge_id',$col_val);"; - print FS "$sql\n"; -} - -sub MySql() { - my $sql = $_[0]; - my @ret = (); - my $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { my @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} - -sub trim { - my $val = shift; - $val =~ s/^ *(.*?) *$/$1/; - return $val; -} diff --git a/modules/apache/html/MassBank/cgi-bin/GenPeakSql.cgi b/modules/apache/html/MassBank/cgi-bin/GenPeakSql.cgi deleted file mode 100755 index 91ca8fcb..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GenPeakSql.cgi +++ /dev/null @@ -1,123 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] PEAK.sqlãƒ•ã‚¡ã‚¤ãƒ«ç”Ÿæˆ -# -# ver 3.0.11 2011.06.03 -# -#------------------------------------------------------------------------------- -use CGI; - -my $query = new CGI; -my $src_dir = $query->param('src_dir'); -my $out_dir = $query->param('out_dir'); -my $db_name = $query->param('db'); -my $fname = $query->param('fname'); -my $recVersion = $query->param('ver'); -if ( !defined($recVersion) ) { $recVersion = 1; } -my @fname_list = split(',' , $fname); - -my %PrecType = ('[M+H]+', 1, '[M+2H]++', 2, '[M-H]-', -1, '[M-2H]--', -2); -my %Mode = ('POSITIVE', 1, 'NEGATIVE', -1); - -open(OUT, ">$out_dir/$db_name"."_PEAK.sql"); -print OUT "START TRANSACTION;\n"; -foreach my $name ( @fname_list ) { - my $file_path = "$src_dir/$name"; - open(IN, "<$file_path"); - while ( ) { - s/\r?\n?//g; - if ( /^ACCESSION: / ) { - s/^[^:]*: //; - $Acc = $_; - $ionP = 0; - $ionM = 0; - $precursor = "NULL"; - } - elsif ( /^RECORD_TITLE: / ) { - s/^[^:]*: //; - $Title = $_; - $Title =~ s/'/''/g; - } - elsif ( /^MS\$FOCUSED_ION: / ) { - my($item, $val) = ($_ =~ /^[^:]*: ([^\s]*) (.*)/); - if ( $item eq 'PRECURSOR_TYPE' ) { - if ( $PrecType{$val} ) { $ionP = $PrecType{$val} }; - } - elsif ( $item eq 'PRECURSOR_M/Z' ) { - $pos = rindex( $val, "/" ); - if ( $pos >= 0 ) { - $val = substr($val, $pos + 1); - } - $val =~ s/^\s+//; - $val =~ s/\s+$//; - # simple numeric check - if ( length($val) > 0 && !($val =~ /[^-,^.,^0-9]/) ) { - $precursor = $val; - } - } - } - elsif ( $recVersion == 1 && /^AC\$ANALYTICAL_CONDITION: / - || $recVersion != 1 && /^AC\$MASS_SPECTROMETRY: / ) { - my($item, $val) = ($_ =~ /^[^:]*: ([^\s]*) (.*)/); - if ( $item eq 'MODE' || $item eq 'ION_MODE' ) { - if ( $Mode{$val} ) { $ionM = $Mode{$val} }; - } - } - elsif ( /^PK\$PEAK: / ) { - if ( !/N\/A$/ ) { - my $tmpOutStr = ""; - my $isNa = 0; - while ( ) { - s/\r?\n?//g; - $isNa = 1 if ( /N\/A/ ); - last if ( $_ =~ m|^RELATED_RECORD:|o || $_ =~ m|^//|o ); - s/^ *//; - (my $mz, my $val, my $rval) = split; - $tmpOutStr .= "INSERT PEAK VALUES ('$Acc', $mz, $val, $rval);\n"; - } - print OUT "$tmpOutStr" if ($isNa == 0); - } - - if ( $ionP == 0 ) { - $ion = $ionM; - } - else { - # "MS\$FOCUSED_ION: PRECURSOR_TYPE" 㨠"AC\$ANALYTICAL_CONDITION: MODE" ã®å€¤ã«ä¸æ•´åˆãŒã‚ã‚‹å ´åˆã¯ã€ - # 必須項目ã§ã‚ã‚‹ "AC\$ANALYTICAL_CONDITION: MODE" ã®å€¤ã‚’優先ã—ã¦ç™»éŒ²ã™ã‚‹ - if ( ($ionP > 0 && $ionM > 0) || ($ionP < 0 && $ionM < 0) ) { - $ion = $ionP; - } - else { - $ion = $ionM; - } - } - print OUT "INSERT SPECTRUM(ID, NAME, ION, PRECURSOR_MZ) " - . "VALUES('$Acc', '$Title', $ion, $precursor);\n"; - } - } - close(IN); -} -print OUT "COMMIT;\n"; -close(OUT); -print "Content-Type: text/plain\n\n"; -print "OK\n"; -exit(0); diff --git a/modules/apache/html/MassBank/cgi-bin/GenSubstructure.cgi b/modules/apache/html/MassBank/cgi-bin/GenSubstructure.cgi deleted file mode 100755 index e2a9fbae..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GenSubstructure.cgi +++ /dev/null @@ -1,102 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2009 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] Structure Search 用テキストファイル生æˆåŠã³ç™»éŒ² -# -# ver 1.0.2 2011.03.10 -# -#------------------------------------------------------------------------------- -use CGI; -use File::Spec; - -print "Content-Type: text/plain\n\n"; - -my $query = new CGI; -my $db = $query->param('db'); -my $abs = File::Spec->rel2abs($0); -my $base_dir = substr($abs, 0, index($abs, 'cgi-bin') - 1); -my $ss_dir = "$base_dir/StructureSearch"; - -#-------------------------------------------- -# 登録情報åˆæœŸåŒ–(ファイル削除) -#-------------------------------------------- -`rm -f $ss_dir/*_filter.txt`; - -my @molfile_all = (); -my $file_name = ''; -my @db_list = split(/,/, $db); -if ( $#db_list < 0 ) { - opendir(DIR, "$base_dir/DB/molfile/"); - while (defined($dir = readdir(DIR))) { - if($dir ne "." && $dir ne "..") { - push (@db_list, $dir); - } - } - closedir(DIR); -} -foreach $db_name (@db_list) { - my $molfile_dir = "$base_dir/DB/molfile/$db_name/"; - my @molfile_name = (); - opendir(DH, $molfile_dir); - while ( $file_name = readdir(DH) ) { - # '.'ã‚„'..'ã‚‚å–å¾—ã•ã‚Œã‚‹ã®ã§ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹ - next if $file_name =~ /^\.{1,2}$/; - # æ‹¡å¼µå­.mol以外ã¯å¯¾è±¡å¤–ã¨ã™ã‚‹ - next if $file_name !~ /\.mol$/o; - my $file_path = $molfile_dir . $file_name; - $file_name =~ s/.mol//; - push( @molfile_name, $file_name ); - push( @molfile_all, $file_path ); - } - #-------------------------------------------- - # DB毎ã®filter.txtを生æˆã™ã‚‹ - #-------------------------------------------- - open(F, ">$ss_dir/" . $db_name . '_filter.txt'); - foreach $file_name (sort @molfile_name) { - print F "$file_name\n"; - } - close(F); - closedir(DH); -} - -#------------------------------------------------ -# MolfileList.txtを生æˆã™ã‚‹ -#------------------------------------------------ -open(F, ">$ss_dir/MolfileList.txt"); -foreach $file_name (sort @molfile_all) { - print F "$file_name\n"; -} -close(F); - -#------------------------------------------------ -# 登録処ç†ã¨å¾Œå‡¦ç† -#------------------------------------------------ -if ( $^O ne 'MSWin32' ) { - `$ss_dir/struct_server -c $ss_dir/MolfileList.txt`; -} -else { - `$ss_dir\\struct_server -c $ss_dir\\MolfileList.txt`; -} -`rm -f $ss_dir/MolfileList.txt`; - - -print "OK\n"; -exit(0); diff --git a/modules/apache/html/MassBank/cgi-bin/GenTree/GenTreeSQL.pl b/modules/apache/html/MassBank/cgi-bin/GenTree/GenTreeSQL.pl deleted file mode 100755 index c25137c2..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GenTree/GenTreeSQL.pl +++ /dev/null @@ -1,88 +0,0 @@ -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] TREE.sqlãƒ•ã‚¡ã‚¤ãƒ«ç”Ÿæˆ - SQLå‡ºåŠ›å‡¦ç† -# -# ver 3.0.2 2009.06.19 -# -#------------------------------------------------------------------------------- - -$Table = 'TREE'; -$Root = shift(@ARGV); -$File = shift(@ARGV); - -%Total = (); -@Name = (); -open(IN, $File); -while ( ) { - s/\r?\n?//g; - @path = split("\t", $_); - pop(@path); - unshift(@path, $Root); - foreach $i ( 0 .. $#path ) { - $node = join("\t", @path[0 .. $i]); - $parent = join("\t", @path[0 .. ($i - 1)]); - if ( $Name[$i] ne $node ) { - $Total{$parent} ++; - $Name[$i] = $node; - } - } -} -close(F); - -%ID = ('', 0); -%Count = (); -@Name = (); -$ID = 0; -open(IN, $File); -print "TRUNCATE TABLE $Table;\n"; -print "START TRANSACTION;\n"; -while ( ) { - s/\r?\n?//g; - @path = split("\t", $_); - $acc = pop(@path); - $leaf = pop(@path); - unshift(@path, $Root); - foreach $i ( 0 .. $#path ) { - $node = join("\t", @path[0 .. $i]); - $parent = join("\t", @path[0 .. ($i - 1)]); - if ( $Name[$i] ne $node ) { - $Count{$parent} ++; - $pos = $Count{$parent}; - $ID ++; - $ID{$node} = $ID; - &Print($ID, $ID{$parent}, $pos, $Total{$node}, $path[$i], 'NULL'); - $Name[$i] = $node; - } - } - $parent = join("\t", @path); - $ID ++; - $Count{$parent} ++; - $pos = $Count{$parent}; - &Print($ID, $ID{$parent}, $pos, -1, $leaf, $acc); -} -print "COMMIT;\n"; -close(F); - -sub Print() { local($id, $parent, $pos, $num, $name, $acc) = @_; - $acc = "'$acc'" if ( $acc ne 'NULL' ); - $name =~ s/'/''/g; - print "INSERT $Table VALUES ($id, $parent, $pos, $num, '$name', $acc);\n"; -} diff --git a/modules/apache/html/MassBank/cgi-bin/GenTree/GetAnotInfo.pl b/modules/apache/html/MassBank/cgi-bin/GenTree/GetAnotInfo.pl deleted file mode 100755 index b43de250..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GenTree/GetAnotInfo.pl +++ /dev/null @@ -1,138 +0,0 @@ -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] TREE.sqlãƒ•ã‚¡ã‚¤ãƒ«ç”Ÿæˆ - 中間ファイル作æˆå‡¦ç† -# -# ver 1.0.14 2012.09.25 -# -#------------------------------------------------------------------------------- - -my $src_dir = $ARGV[0]; - -@info = (); -opendir(dIR, $src_dir); -while ( $file = readdir(dIR) ) { - next if ( $file =~ /^\./ || $file !~ /\.txt$/ ); - local(@data) = (); - my $version = 1; - my $acc = ''; - my $title = ''; - my $instrument = ''; - my $mw = ''; - my $formula = ''; - my $name = ''; - my $ion_ptype = ''; - my $ion_itype = ''; - my $ion_mode = ''; - my $mstype = ''; - my $ce = ''; - my $rt = ''; - my $mt = ''; - my $sc = ''; - my $pmz = ''; - open(fILE, "$src_dir/$file"); - while ( ) { - s/\r?\n?//g; - - # get value of MassBank record - if ( /^ACCESSION: (.*)$/ ) { $acc = $1; } - if ( /^RECORD_TITLE: (.*)$/ ) { $title = $1; } - if ( /^LICENSE:/ ) { $version = 2; } - if ( /^CH\$EXACT_MASS: (.*)$/ ) { $mw = $1; } - if ( /^CH\$FORMULA: (.*)$/ ) { $formula = $1; } - if ( /^AC\$INSTRUMENT_TYPE: (.*)$/ ) { $instrument = $1; } - if ( $version != 1 ) { - if ( /^AC\$MASS_SPECTROMETRY: MS_TYPE (.*)$/ ) { $mstype = $1; } - if ( /^AC\$MASS_SPECTROMETRY: ION_MODE (.*)$/ ) { $ion_mode = $1; } - if ( /^AC\$MASS_SPECTROMETRY: COLLISION_ENERGY (.*)$/ ) { $ce = $1; } - if ( /^AC\$CHROMATOGRAPHY: MIGRATION_TIME (.*)$/ ) { $mt = $1; } - if ( /^AC\$CHROMATOGRAPHY: RETENTION_TIME (.*)$/ ) { $rt = $1; } - if ( /^AC\$CHROMATOGRAPHY: SAMPLING_CONE (.*)$/ ) { $sc = $1; } - } - else { - if ( /^AC\$ANALYTICAL_CONDITION: MS_TYPE (.*)$/ ) { $mstype = $1; } - if ( /^AC\$ANALYTICAL_CONDITION: MODE (.*)$/ ) { $ion_mode = $1; } - if ( /^AC\$ANALYTICAL_CONDITION: COLLISION_ENERGY (.*)$/ ) { $ce = $1; } - if ( /^AC\$ANALYTICAL_CONDITION: MIGRATION_TIME (.*)$/ ) { $mt = $1; } - if ( /^AC\$ANALYTICAL_CONDITION: RETENTION_TIME (.*)$/ ) { $rt = $1; } - if ( /^AC\$ANALYTICAL_CONDITION: SAMPLING_CONE (.*)$/ ) { $sc = $1; } - } - if ( /^MS\$FOCUSED_ION: PRECURSOR_TYPE (.*)$/ ) { $ion_ptype = $1; } - if ( /^MS\$FOCUSED_ION: PRECURSOR_M\/Z (.*)$/ ) { $pmz = $1; } - if ( /^MS\$FOCUSED_ION: ION_TYPE (.*)$/ ) { $ion_itype = $1; } - } - close(fILE); - - # edit value - ($name) = ($title =~ /^([^;]*);/); - $mw = int($mw + 0.5) if( $mw > 0 ); - - # set tree value - # $data[0] : INSTRUMENT_TYPE - # $data[1] : EXACT_MASS - # $data[2] : FORMULA - # $data[2] : RECORD_TITLE[0] - # $data[4] : ION_TYPE or PRECURSOR_TYPE or ION_MODE - # $data[5] : (PRECURSOR_M/Z or COLLISION_ENERGY or RETENTION_TIME or MIGRATION_TIME or SAMPLING_CONE) or (ACCESSION) - $data[0] = $instrument; - $data[1] = "MW ".$mw; - $data[2] = $formula; - $data[3] = $name; - $data[4] = $ion_itype; - $data[4] = $ion_ptype if ($data[4] eq ''); - $data[4] = $ion_mode if ($data[4] eq ''); - $data[5] = $mstype if ($mstype ne ''); - $data[5] .= " / $pmz" if ($pmz ne ''); - $data[5] .= " / CE:$ce" if ($ce ne ''); - $data[5] .= " / RT:$rt" if ($ce eq '' && $rt ne ''); - $data[5] .= " / MT:$mt" if ($ce eq '' && $rt eq '' && $mt ne ''); - $data[5] .= " / SC:$sc" if ($ce eq '' && $rt eq '' && $mt eq '' && $sc ne ''); - $data[5] = $acc if ($data[5] eq ''); - for $j ( 0 .. $#data ) { - if ( $data[$j] eq '' ) { $data[$j] = '---'; } - } - - push(@data, $acc); - push(@info, [ @data ]); -} -closedir(dIR); -foreach $info ( sort mySort @info ) { - local(@out) = @$info; - print join("\t", @out), "\n"; -} -exit(0); - -sub mySort() { - local(@a) = @$a; - local(@b) = @$b; - local($x, $y, $i); - foreach $i ( 0 .. $#a ) { - $x = $a[$i]; - $y = $b[$i]; - if ( $x =~ /^\d+$/ ) { - return ($x <=> $y) if ( $x <=> $y ); - } else { - return ($x cmp $y) if ( $x cmp $y ); - } - } - return 0; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GenTree/MassBank_tree.conf b/modules/apache/html/MassBank/cgi-bin/GenTree/MassBank_tree.conf deleted file mode 100644 index 6c5b0190..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GenTree/MassBank_tree.conf +++ /dev/null @@ -1,171 +0,0 @@ -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] TREE.sqlãƒ•ã‚¡ã‚¤ãƒ«ç”Ÿæˆ - 詳細設定 -# -# ver 1.0.8 2008.12.05 -# -#------------------------------------------------------------------------------- -use Switch; - -@Tag = ( - ['RECORD_TITLE', 'CH$EXACT_MASS', 'CH$FORMULA', - 'RECORD_TITLE', 'MS$FOCUSED_ION', 'AC$ANALYTICAL_CONDITION'] - ); - -@GetProc = ('&GetProc1'); -@OutProc = ('&OutProc1'); -local($title, $mstype); - -sub GetProc1() { local($pos, $data) = @_; - # ms type - if( $pos == 0 ) { - $mstype = ''; - $title = $data; - local(@titles) = split( /; /, $data); - for $i ( 0 .. $#titles ) { - switch ($titles[$i]) { - case 'QqQ' { $mstype = 'QqQ-MS'; } # for Keio, Waters - case 'QqTOF' { $mstype = 'QqTOF-MS'; } # for Keio - case 'IT' { $mstype = 'IT-MS'; } # for Keio - case 'LC-Q/MS' { $mstype = 'LC-Q-MS'; } # for Waters - case 'FAB CID-MS/MS' { $mstype = 'FAB-MS/MS'; } # for Kyoto - case 'QqIT' { $mstype = 'QqIT-MS'; } # for Tokyo - case 'Orbitrap' { $mstype = 'LC-Orbitrap-MS'; } # for Tokyo - case 'CE-TOF/MS' { $mstype = 'CE-TOF-MS'; } # for RIKEN - case 'GC-TOF/MS' { $mstype = 'GC-TOF-MS'; } # for RIKEN - case 'LC-TOF/MS' { $mstype = 'LC-TOF-MS'; } # for RIKEN - case 'LC-MS/MS' { - if ( $titles[$i+1] eq 'QqQ' ) { - $mstype = 'LC-QqQ-MS'; - } - elsif ( $titles[$i+1] eq 'Q-TOF' ) { - $mstype = 'LC-QTOF-MS'; - } - } - else {} - } - if ( $mstype ne '' ) { - @ms = split( '-', $mstype ); - switch ( $ms[0]) { - case ['LC','CE'] { $inst_type = "$ms[0]-ESI-$ms[1]-$ms[2]"; } - case 'GC' { $inst_type = "$ms[0]-EI-$ms[1]-$ms[2]"; } - case 'FAB' { $inst_type = $mstype; } - else { $inst_type = 'ESI-' . $mstype; } - } - return $inst_type; - } - } - return $titles[$#titles]; - } - # integer mass weight - elsif ( $pos == 1 ) { - local($mw0) = int($data + 0.5); - return $mw0; - } - # compound name - elsif ( $pos == 3 ) { - local($name) = ($data =~ /^([^;]*);/); - return $name; - } - elsif ( $pos == 4 ) { - my $ret =''; - local($tag, $val) = ($data =~ /^([^ ]*) (.*)$/); - # DERIVATIVE_TYPE - if ( $mstype eq 'GC-TOF-MS' ) { - if ( $tag eq 'DERIVATIVE_TYPE' ) { - $ret = $val; - } - } - elsif ( $mstype eq 'LC-QqQ-MS' || $mstype eq 'LC-QTOF-MS' ) { - $ret = ''; - } - # PRECURSOR_TYPE - else { - if ( $tag eq 'PRECURSOR_TYPE' || $tag eq 'ION_TYPE' ) { - $ret = $val; - } - } - return $ret; - } - elsif ( $pos == 5 ) { - my $ret =''; - $isFound = true; - if ( $mstype eq 'IT-MS' || $mstype eq 'LC-Orbitrap-MS' ) { - # PRECURSOR_M/Z - local($type, $info) = ($title =~ /^[^;]*; ([^;]*); [^;]*; ([^;]*);/); - $ret = "$type $info"; - } - elsif ( $mstype eq 'FAB-MS/MS' ) { - # PRECURSOR_M/Z - local($info) = ($title =~ /^[^;]*; [^;]*; ([^;]*);/); - $ret = "MS/MS $info"; - } - else { - local($tag, $val) = ($data =~ /^([^ ]*) (.*)$/); - # COLLISION_ENERGY (L6) - if ( ($mstype eq 'QqQ-MS' || $mstype eq 'QqTOF-MS' || $mstype eq 'QqIT-MS' - || $mstype eq 'LC-QqQ-MS' || $mstype eq 'LC-QTOF-MS') - && $tag eq 'COLLISION_ENERGY' ) { - if ( $mstype eq 'LC-QTOF-MS' ) { - local($ion) = ($title =~ /^[^;]*; [^;]*; [^;]*; [^;]*; ([^;]*)/); - $ret = "MS/MS $val; $ion"; - } - else { - $ret = "MS/MS $val"; - } - } - # RETENTION_TIME or MIGRATION_TIME (L5) - elsif ( ($mstype eq 'LC-TOF-MS' && $tag eq 'RETENTION_TIME') - || ($mstype eq 'CE-TOF-MS' && $tag eq 'MIGRATION_TIME') ) { - $ret = $val; - } - # SAMPLING_CONE (L5) - elsif ( $mstype eq 'LC-Q-MS' && $tag eq 'SAMPLING_CONE' ) { - local($mode) = ($title =~ /^[^;]*; [^;]*; ([^;]*);/); - $ret = "$mode\t$val"; - } - else { - if ( $mstype eq '' || ($mstype eq 'LC-TOF-MS' && $tag eq 'SPECTRUM_TYPE') ) { - $ret = '---'; - } - else { - $isFound = false; - $ret = ''; - } - } - } - return $ret; - } - else { # otherwise - return $data; - } -} - -sub OutProc1() { local($pos, $data) = @_; - if ( 1 == $pos ) { # mass weight - return "MW $data"; - } - else { # otherwise - return $data; - } -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GenTreeSql.cgi b/modules/apache/html/MassBank/cgi-bin/GenTreeSql.cgi deleted file mode 100755 index 8552b66a..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GenTreeSql.cgi +++ /dev/null @@ -1,49 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] TREE.sqlãƒ•ã‚¡ã‚¤ãƒ«ç”Ÿæˆ -# -# ver 3.0.3 2012.10.11 -# -#------------------------------------------------------------------------------- -use CGI; -use Cwd; - -my $query = new CGI; -my $src_dir = $query->param('src_dir'); -my $out_dir = $query->param('out_dir'); -my $db_name = $query->param('db'); -my $name = $query->param('name'); - -my $fileName = $_[0]; -my $cdir = getcwd(); -my $subdir = $cdir . "/GenTree/"; -my $prog1 = $subdir . "GetAnotInfo.pl"; -my $prog2 = $subdir . "GenTreeSQL.pl"; -my $fname_info = $out_dir. $db_name . "_TREE.info"; -my $fname_sql = $out_dir. $db_name . "_TREE.sql"; -my $cmd1 = "perl \"$prog1\" \"$src_dir\" > \"$fname_info\""; -my $cmd2 = "perl \"$prog2\" \"MassBank / $name\" \"$fname_info\" > \"$fname_sql\""; -`$cmd1`; -`$cmd2`; -print "Content-Type: text/plain\n\n"; -print "OK\n"; -exit(0); diff --git a/modules/apache/html/MassBank/cgi-bin/GetCompoudInfo.cgi b/modules/apache/html/MassBank/cgi-bin/GetCompoudInfo.cgi deleted file mode 100755 index 84dcdd7a..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetCompoudInfo.cgi +++ /dev/null @@ -1,95 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2010 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# 化åˆç‰©æƒ…å ±å–å¾— -# -# ver 1.0.0 2010.10.29 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -print "Content-Type: text/plain\n\n"; - -my $query = new CGI; -my $name = $query->param('name'); -my $DbName = $query->param('dsn'); -my $id = $query->param('id'); -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $Host .= $_; -} -my $DB = "DBI:mysql:$DbName:$Host"; -my $User = 'bird'; -my $PassWord = 'bird2006'; -my $GifDir = "../DB/gif/$DbName"; -my $GifSmallDir = "../DB/gif_small/$DbName"; -my $GifLargeDir = "../DB/gif_large/$DbName"; - -my $dbh = DBI->connect($DB, $User, $PassWord) || &errorexit; - - -if ( $id ne '' ) { - @ans = &MySql("select FORMULA, EXACT_MASS from RECORD where id = '$id'"); - my $formula = $ans[0][0]; - my $mass = $ans[0][1]; - print "---FORMULA:$formula\n"; - print "---EXACT_MASS:$mass\n"; -} - -$name =~ s/\'/\'\'/g; -@ans = &MySql("select FILE, NAME from MOLFILE where NAME='$name'"); -print STDERR "select FILE, NAME from MOLFILE where NAME='$name'"; -foreach $x ( @ans ) { - ($fname, $name) = @$x; - my $allGif = 1; - print "---NAME:$name\n"; - if ( -f "$GifDir/$fname.gif" ) { - print "---GIF:$fname.gif\n"; - } - if ( -f "$GifSmallDir/$fname.gif" ) { - print "---GIF_SMALL:$fname.gif\n"; - } -} -$dbh->disconnect; -exit(0); - -sub errorexit() { - print "-1\n"; - exit(0); -} - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql) || &errorexit; - $sth->execute || &errorexit; - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish || &errorexit; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetData.cgi b/modules/apache/html/MassBank/cgi-bin/GetData.cgi deleted file mode 100755 index a0c2db39..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetData.cgi +++ /dev/null @@ -1,69 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# スペクトル情報å–å¾— -# -# ver 3.0.1 2008.12.05 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -$DB = '../DB'; - -$query = new CGI; -$id = $query->param('id'); -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); -@ans = &MySql("select MZ, INTENSITY, RELATIVE from PEAK where ID='$id' order by MZ"); -foreach $rec ( @ans ) { print join("\t", @$rec), "\n"; } -$dbh->disconnect; - -print "\n"; - -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetData2.cgi b/modules/apache/html/MassBank/cgi-bin/GetData2.cgi deleted file mode 100755 index 58553291..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetData2.cgi +++ /dev/null @@ -1,136 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# 複数スペクトル情報ã®å–å¾— -# -# ver 3.0.1 2008.12.05 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -$query = new CGI; -$ids = $query->param('id'); -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -$SQLDB = "DBI:mysql:$db_name:$host_name"; - -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); - -@id_list = split( ',', $ids ); -$diff = $query->param('diff'); -$mzs = $query->param('mz'); -if ( $mzs ne '' ) { - $tols = $query->param('tol'); - $ints = $query->param('int'); - @mz_list = split( ',', $mzs ); - @tol_list = split( ',', $tols ); - @int_list = split( ',', $ints ); -} - -foreach $id ( @id_list ) { - @ans = &MySql("select MZ,RELATIVE from PEAK where ID='$id' order by MZ"); - $num = @ans; - if ( $num == 0 ) { - print "0\t0\n"; - next; - } - foreach $rec ( @ans ) { - print join("\t", @$rec), "\t\t"; - } - - @ans = &MySql("select PRECURSOR_MZ from SPECTRUM where ID = '$id'"); - $precursor = $ans[0][0]; - if ( $precursor ne '' ) { - print "precursor=$precursor\t"; - } - - if ( $mzs ne '' ) { - print "hit="; - if ( $diff eq 'no' ) { - $where = ' and ('; - for ( $i = 0; $i <= $#mz_list; $i++ ) { - $mz1 = $mz_list[$i] - $tol_list[$i] - 0.00001; - $mz2 = $mz_list[$i] + $tol_list[$i] + 0.00001; - $where .= "(MZ between $mz1 and $mz2 and RELATIVE > $int_list[$i])"; - if ( $i < $#mz_list ) { - $where .= " or "; - } - } - $where .= ')'; - $sql = "select MZ from PEAK where ID='$id'" . $where; - @ans = &MySql( $sql ); - foreach $rec ( @ans ) { - print "@$rec[0]\t"; - } - } - else { - for ( $i = 0; $i <= $#mz_list; $i++ ) { - $mz = $mz_list[$i]; - $mz1 = $mz - $tol_list[$i] - 0.00001; - $mz2 = $mz + $tol_list[$i] + 0.00001; - $sql = "select t2.MZ, t1.MZ from PEAK as t1 left join PEAK as t2" - ." on t1.ID = t2.ID where t1.ID = '$id'"; - $where = " and t1.MZ between t2.MZ + $mz1 and t2.MZ + $mz2 " - . "and t1.RELATIVE > $int_list[$i] and t2.RELATIVE > $int_list[$i]"; - @ans = &MySql( $sql . $where ); - $rec_cnt = @ans; - if ( $rec_cnt == 0 ) { - print "$mz,,\t"; - } - else { - foreach $rec ( @ans ) { - print "$mz,"; - print join( ",", @$rec ), "\t"; - } - } - } - } - } - print "\n"; -} -$dbh->disconnect; - -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetInstInfo.cgi b/modules/apache/html/MassBank/cgi-bin/GetInstInfo.cgi deleted file mode 100755 index ab1d910f..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetInstInfo.cgi +++ /dev/null @@ -1,129 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# INSTRUMENT情報ã¨MS情報ã®å–å¾— -# -# ver 1.0.5 2011.07.22 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -my $query = new CGI; -my $recVersion = $query->param('ver'); # MassBank Record version -if ( !defined($recVersion) ) { $recVersion = 1; } -my $isPeakAdv = $query->param('padv'); # PeakSearchAdvanced flag -if ( !defined($isPeakAdv) ) { $isPeakAdv = 0; } -my $db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -my $host_name = ""; -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -my $SQLDB = "DBI:mysql:$db_name:$host_name"; -my $User = 'bird'; -my $PassWord = 'bird2006'; -my $dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); - -# Exist check PRE_PRO table -my $isExistPrePro = 0; -if ( $isPeakAdv ) { - $sql = "SHOW TABLES LIKE 'PRE_PRO'"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt != 0 ) { - $isExistPrePro = 1; - } -} - -# Get instrument information -if ( $recVersion > 1 ) { - print "INSTRUMENT_INFORMATION\n"; -} -if ( !$isPeakAdv ) { - my $sql = "SELECT INSTRUMENT_NO, INSTRUMENT_TYPE, INSTRUMENT_NAME FROM INSTRUMENT"; - my @ans = &MySql( $sql ); - foreach my $rec ( @ans ) { - print join("\t", @$rec) ,"\n"; - } -} -else { - if ( $isExistPrePro ) { - my $sql = "SELECT i.INSTRUMENT_NO, i.INSTRUMENT_TYPE, i.INSTRUMENT_NAME FROM INSTRUMENT i, (SELECT DISTINCT r.INSTRUMENT_NO FROM PRE_PRO pp LEFT JOIN RECORD r ON pp.ID = r.ID) tmp WHERE i.INSTRUMENT_NO = tmp.INSTRUMENT_NO"; - my @ans = &MySql( $sql ); - foreach my $rec ( @ans ) { - print join("\t", @$rec) ,"\n"; - } - } -} - -# Get ms information -if ( $recVersion > 1 ) { - print "MS_INFORMATION\n"; - $sql = "SHOW FIELDS FROM RECORD LIKE 'MS_TYPE'"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt != 0 ) { - if ( !$isPeakAdv ) { - $sql = "SELECT DISTINCT MS_TYPE FROM RECORD"; - @ans = &MySql( $sql ); - foreach my $rec ( @ans ) { - print join("\t", @$rec) ,"\n"; - } - } - else { - if ( $isExistPrePro ) { - $sql = "SELECT DISTINCT r.MS_TYPE FROM PRE_PRO pp LEFT JOIN RECORD r ON pp.ID = r.ID"; - @ans = &MySql( $sql ); - foreach my $rec ( @ans ) { - print join("\t", @$rec) ,"\n"; - } - } - } - } -} - -$dbh->disconnect; -exit(0); - -sub MySql() { - my $sql = $_[0]; - my @ans = (); - my @ret = (); - my $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - my $n = $sth->rows; - for ( my $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish; - return @ret; -} -1; - diff --git a/modules/apache/html/MassBank/cgi-bin/GetMolfile.cgi b/modules/apache/html/MassBank/cgi-bin/GetMolfile.cgi deleted file mode 100755 index 05bbe1f0..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetMolfile.cgi +++ /dev/null @@ -1,91 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# Molfile情報一括å–å¾— -# -# ver 1.0.0 2009.10.15 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -print "Content-Type: text/plain\n\n"; - -my $query = new CGI; -my $names = $query->param('names'); -my $DbName = $query->param('dsn'); -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $Host .= $_; -} -my $DB = "DBI:mysql:$DbName:$Host"; -my $User = 'bird'; -my $PassWord = 'bird2006'; -my $MolDir = "../DB/molfile/$DbName"; -my $dbh = DBI->connect($DB, $User, $PassWord) || &errorexit; -my @name_list = split( '@', $names ); -my $in = "NAME in("; -foreach my $name ( @name_list ) { - $name =~ s/\'/\'\'/g; -# print $name . "\n"; - $in .= "'$name',"; -} -chop $in; -$in .= ")"; -#print "select FILE, NAME from MOLFILE where $in\n"; -@ans = &MySql("select FILE, NAME from MOLFILE where $in"); -foreach $x ( @ans ) { - ($fname, $name) = @$x; - open(F, "$MolDir/$fname.mol"); - @mol = (); - while ( ) { - push(@mol, $_); - } - close(F); - print "---NAME:$name\n"; - foreach $x ( @mol ) { - print "$x"; - } -} -$dbh->disconnect; -exit(0); - -sub errorexit() { - print "-1\n"; - exit(0); -} - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql) || &errorexit; - $sth->execute || &errorexit; - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish || &errorexit; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetMolfileById.cgi b/modules/apache/html/MassBank/cgi-bin/GetMolfileById.cgi deleted file mode 100755 index f96d4555..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetMolfileById.cgi +++ /dev/null @@ -1,69 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# スペクトル情報å–å¾— -# -# ver 3.0.1 2008.12.05 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -$DB = '../DB'; - -$query = new CGI; -$id = $query->param('id'); -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); -@ans = &MySql("select FILE from CH_NAME, MOLFILE where CH_NAME.NAME = MOLFILE.NAME and ID = '$id'"); -foreach $rec ( @ans ) { print join("\t", @$rec), "\n"; } -$dbh->disconnect; - -print "\n"; - -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetName.cgi b/modules/apache/html/MassBank/cgi-bin/GetName.cgi deleted file mode 100755 index 3b775d9b..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetName.cgi +++ /dev/null @@ -1,86 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# å…¨ã¦ã®åŒ–åˆç‰©åリストå–å¾— -# -# ver 3.0.1 2008.12.05 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -$query = new CGI; -$name = $query->param('name'); -$wc = $query->param('wc'); -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); -$sql = "select NAME, ID from SPECTRUM"; -if ( $name ne '' ) { - $sql .= " where left(NAME,instr(NAME,';')-1) "; - if ( $wc eq 'both' ) { - $sql .= "like '\%$name\%'"; - } elsif ( $wc eq 'start' ) { - $sql .= "like '\%$name'"; - } elsif ( $wc eq 'end' ) { - $sql .= "like '$name\%'"; - } else { - $sql .= "='$name'"; - } -} -$sql .= " order by ID"; - -@ans = &MySql( $sql ); -foreach $rec ( @ans ) { - print join("\t", @$rec) ,"\n"; -} -$dbh->disconnect; -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish; - return @ret; -} - -1; - diff --git a/modules/apache/html/MassBank/cgi-bin/GetRecordInfo.cgi b/modules/apache/html/MassBank/cgi-bin/GetRecordInfo.cgi deleted file mode 100755 index 224746e0..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetRecordInfo.cgi +++ /dev/null @@ -1,92 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2009 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# レコード情報å–å¾— -# -# ver 1.0.1 2011.06.10 -# -#------------------------------------------------------------------------------- -use DBI; -use CGI; - -my $query = new CGI; -my $db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -my $ids = $query->param('ids'); -my @id_list = split(',', $ids); - -# $mode:ver -# [ID]\t[RECORD FORMAT VERSION] -# $mode:peak -# [ACCESSION INFORMATION] & [PEAK INFORMATION] -# $mode:none -# [ALL RECORD INFORMATION] -my $mode = $query->param('mode'); -if ( $mode eq 'ver' ) { - if ( $#id_list < 0 ) { - if ( -d "../DB/annotation/$db_name/" ) { - my @recfiles = glob "../DB/annotation/$db_name/*.txt"; - foreach my $rec_file ( @recfiles ) { - (my $acc = $rec_file) =~ s/.*\/(........)\.txt$/$1/; - push(@id_list, $acc); - } - } - } -} - -print "Content-Type: text/plain\n\n"; -foreach my $id ( @id_list ){ - my $path = "../DB/annotation/$db_name/$id.txt"; - my $isVer = 0; - if ( -f $path ) { - open(F, $path); - my $isPeakLine = false; - while ( ) { - my $line = $_; - if ( $mode eq 'peak' ) { - if ( index($line, 'PK$PEAK') >= 0 ) { - $isPeakLine = true; - } - elsif ( index($line, 'ACCESSION') == -1 ) { - if ( $isPeakLine eq false ) { - next; - } - } - } - elsif ( $mode eq 'ver' ) { - if ( index($line, 'LICENSE') != -1 ) { - print "$id\t2\n"; - $isVer = 1; - last; - } - next; - } - print $line; - } - close(F); - } - if ( $mode eq 'ver' && $isVer == 0 ) { - print "$id\t1\n"; - } -} -exit(0); diff --git a/modules/apache/html/MassBank/cgi-bin/GetRecordList.cgi b/modules/apache/html/MassBank/cgi-bin/GetRecordList.cgi deleted file mode 100755 index fe788e90..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetRecordList.cgi +++ /dev/null @@ -1,78 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] Contributor毎ã®åŒ–åˆç‰©åリストをå–å¾— -# -# ver 1.0.2 2008.12.05 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -$query = new CGI; -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); -$sql = "select substring(NAME,1,instr(NAME,';')-1) as compound, " - ."FORMULA from SPECTRUM S, RECORD R " - ."where S.ID=R.ID group by compound order by compound"; -@ans1 = &MySql( $sql ); -foreach $rec1 ( @ans1 ) { - my $compound = @$rec1[0]; - $compound =~ s/\'/\\\'/g; - $sql = "select ID, NAME from SPECTRUM where substring(NAME,1,instr(NAME,';')-1)='$compound' order by ID"; - @ans2 = &MySql( $sql ); - my @ids = (); - foreach $rec2 ( @ans2 ) { - push(@ids, "@$rec2[0] NAME=@$rec2[1]"); - } - print join("\t", @$rec1), "\t", join("@", @ids), "\n"; -} -$dbh->disconnect; -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish; - return @ret; -} -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetSon.cgi b/modules/apache/html/MassBank/cgi-bin/GetSon.cgi deleted file mode 100755 index 051d0190..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetSon.cgi +++ /dev/null @@ -1,77 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# Browse Page ツリー情報å–å¾— -# -# ver 3.0.1 2008.12.05 -# -#------------------------------------------------------------------------------- -print "Content-Type: text/plain\n\n"; - -use CGI; - -$query = new CGI; -$id = $query->param('id'); -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} -use DBI; - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); -@ans = &MySql("select NO, INFO, SON, ID from TREE where PARENT = $id"); -$dbh->disconnect; - -foreach $rec ( @ans ) { - $acc = @$rec[3]; - if ( $acc eq '' ) { - $name = ""; - } - else { - @ans1 = &MySql("select NAME from SPECTRUM where ID = '$acc'"); - $name = $ans1[0][0]; - } - print join("\t", @$rec); - print "\t$name\n"; -} - -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetSpectrumData.cgi b/modules/apache/html/MassBank/cgi-bin/GetSpectrumData.cgi deleted file mode 100755 index d4cb55b2..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetSpectrumData.cgi +++ /dev/null @@ -1,122 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# スペクトルã®ã‚°ãƒ«ãƒ¼ãƒ—情報å–å¾— -# -# ver 3.0.4 2011.07.12 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -my $query = new CGI; -my $db_name = $query->param('dsn'); -my $id = $query->param('id'); -my $ion = $query->param('ion'); -my $relation = $query->param('relation'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; - -$SQLDB = "DBI:mysql:$db_name:$host_name"; - -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); - -# get child spectrum info -if ( $relation ne 'true' ) { - &getChildInfo($id); -} -# get child spectrum info & get relation parent spectrum info -else { - my @parent_info = &MySql("SELECT s.NAME, r.INSTRUMENT_NO FROM SPECTRUM s LEFT JOIN RECORD r ON s.ID=r.ID WHERE s.ID='$id'"); - if ( $parent_info[0][0] ne '' ) { - my $title = $parent_info[0][0]; - $title =~ s|^([^;]*; [^;]*;) .*|$1|; - $title =~ s|'|\\'|; - my $ionStr = ""; - $ionStr = " and s.ION > 0" if $ion > 0; - $ionStr = " and s.ION < 0" if $ion < 0; - my $inst = $parent_info[0][1]; - my @child_ids = &MySql("SELECT s.ID FROM SPECTRUM s LEFT JOIN RECORD r ON s.ID=r.ID WHERE INSTR(s.NAME, '$title')=1$ionStr and r.INSTRUMENT_NO='$inst' ORDER BY 1"); - for( $i=0; $i<=$#child_ids; $i++ ) { - $child_id = $child_ids[$i][0]; - if ( $child_id ne '' ) { - &getChildInfo($child_id); - } - } - } - else { - &getChildInfo($id); - } -} -$dbh->disconnect; -exit(0); - -sub getChildInfo() { - local($key_id) = @_; - my(@ans, $num, $rec, $name, $precursor); - - @ans = &MySql("select MZ, RELATIVE from PEAK where ID='$key_id' order by MZ"); - $num = @ans; - if ( $num == 0 ) { - print "0\t0\t\t"; - } - else { - foreach $rec ( @ans ) { - print join("\t", @$rec), "\t\t"; - } - } - - # follow record info - print "::"; - - @ans = &MySql("select NAME, PRECURSOR_MZ from SPECTRUM where ID = '$key_id'"); - $name = $ans[0][0]; - if ( $name ne '' ) { - print "\tname=$name\t"; - } - $precursor = $ans[0][1]; - if ( $precursor ne '' ) { - print "\tprecursor=$precursor\t"; - } - print "\tid=$key_id\t\n"; -} - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute || exit(0); - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetStructure.cgi b/modules/apache/html/MassBank/cgi-bin/GetStructure.cgi deleted file mode 100755 index f034d663..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetStructure.cgi +++ /dev/null @@ -1,119 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2010 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# 構造情報一括å–å¾— -# -# ver 1.0.1 2010.08.17 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -print "Content-Type: text/plain\n\n"; - -my $query = new CGI; -my $names = $query->param('names'); -my $DbName = $query->param('dsn'); -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $Host .= $_; -} -my $DB = "DBI:mysql:$DbName:$Host"; -my $User = 'bird'; -my $PassWord = 'bird2006'; -my $MolDir = "../DB/molfile/$DbName"; -my $GifDir = "../DB/gif/$DbName"; -my $GifSmallDir = "../DB/gif_small/$DbName"; -my $GifLargeDir = "../DB/gif_large/$DbName"; - -my $dbh = DBI->connect($DB, $User, $PassWord) || &errorexit; -my @name_list = split( '@', $names ); -my $in = "NAME in("; -foreach my $name ( @name_list ) { - $name =~ s/\'/\'\'/g; - $in .= "'$name',"; -} -chop $in; -$in .= ")"; -@ans = &MySql("select FILE, NAME from MOLFILE where $in"); -foreach $x ( @ans ) { - ($fname, $name) = @$x; - my $allGif = 1; - print "---NAME:$name\n"; - if ( -f "$GifDir/$fname.gif" ) { - print "---GIF:$fname.gif\n"; - } - else { - print "---GIF:\n"; - $allGif = 0; - } - if ( -f "$GifSmallDir/$fname.gif" ) { - print "---GIF_SMALL:$fname.gif\n"; - } - else { - print "---GIF_SMALL:\n"; - $allGif = 0; - } - if ( -f "$GifLargeDir/$fname.gif" ) { - print "---GIF_LARGE:$fname.gif\n"; - } - else { - print "---GIF_LARGE:\n"; - $allGif = 0; - } - - # When all GIF doesn't exist - if ( $allGif == 0 ) { - open(F, "$MolDir/$fname.mol"); - @mol = (); - while ( ) { - push(@mol, $_); - } - close(F); - foreach $x ( @mol ) { - print "$x"; - } - } -} -$dbh->disconnect; -exit(0); - -sub errorexit() { - print "-1\n"; - exit(0); -} - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql) || &errorexit; - $sth->execute || &errorexit; - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish || &errorexit; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/GetVersion.cgi b/modules/apache/html/MassBank/cgi-bin/GetVersion.cgi deleted file mode 100755 index 42c9f3fc..00000000 --- a/modules/apache/html/MassBank/cgi-bin/GetVersion.cgi +++ /dev/null @@ -1,137 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# CGIã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…å ±å–å¾— -# -# ver 1.0.3 2008.12.05 -# -#------------------------------------------------------------------------------- -use Cwd; - -print "Content-Type: text/plain\n\n"; -my @files = (); -my @fileList1 = GetFileList("."); -foreach $name1 ( @fileList1 ) { - # ディレクトリã®å ´åˆ - if ( $name1 =~ /\.(cgi|pl|conf)$/ ) { - push(@files, $name1); - } - elsif ( -d $name1 ) { - my $dir = $name1; - my @fileList2 = GetFileList($dir); - foreach $name2 ( @fileList2 ) { - if ( $name2 =~ /\.(cgi|pl|conf)$/ ) { - push(@files, "$dir/$name2"); - } - } - } -} - -foreach $fileName ( sort(@files) ) { - my $version; - if ( isExeBinary($fileName) ) { - $version = GetVerBin($fileName); - } - else { - $version = GetVerPerl($fileName); - } - print "$fileName\t$version\n"; -} -exit(0); - -# ファイル形å¼åˆ¤å®š -sub isExeBinary() { - my $fileName = $_[0]; - my @str = (); - open(FH, "<$fileName"); - for ( my $i = 0; $i < 4; $i++ ) { - read( FH, $str[$i], 1 ); - } - if ( ord($str[0]) == 0x7f ) { - my $ident = $str[1] . $str[2] . $str[3]; - if ( $ident eq 'ELF' ) { - return 1; - } - } - else { - my $ident = $str[0] . $str[1]; - # EXE(Windowsãƒã‚¤ãƒŠãƒª) - if ( $ident eq 'MZ' ) { - return 1; - } - } - close(FH); - return 0; -} - -# ãƒã‚¤ãƒŠãƒªãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‹ã‚‰ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾— -sub GetVerBin() { - my $fileName = $_[0]; - my $cdir = getcwd(); - my $cmd = "\"$cdir/$fileName\" -v"; - my $version = `$cmd`; - if ( $version eq '' ) { - $version = '-'; - } - return $version; -} - -# Perlスクリプトã‹ã‚‰ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾— -sub GetVerPerl() { - my $fileName = $_[0]; - my $version = '-'; - my $isStart = false; - open(FH, "<$fileName"); - while ( my $line = ) { - chomp $line; - if ( $isStart eq true ) { - if ( $line =~ /^#--/ ) { - last; - } - my $find_str = '# ver'; - my $pos = index( $line, $find_str ); - if ( $pos >= 0 ) { - my $pos_start = $pos + length($find_str); - $version = substr( $line, $pos_start, length($line)-$pos_start ); - } - } - else { - if ( $line =~ /^#--/ ) { - $isStart = true; - } - } - } - close(FH); - return $version; -} -# ファイル一覧å–å¾— -sub GetFileList() { - my $path = $_[0]; - my @files = (); - opendir(DH, $path); - while ( my $file = readdir(DH) ) { - # '.'ã‚„'..'ã‚‚å–れるã®ã§ã€ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹ - next if $file =~ /^\.{1,2}$/; - push(@files, $file); - } - closedir(DH); - return @files; -} diff --git a/modules/apache/html/MassBank/cgi-bin/IndexCount.cgi b/modules/apache/html/MassBank/cgi-bin/IndexCount.cgi deleted file mode 100755 index 65d85327..00000000 --- a/modules/apache/html/MassBank/cgi-bin/IndexCount.cgi +++ /dev/null @@ -1,167 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# RecordIndexページ用件数カウントCGI -# -# ver 3.0.4 2011.08.24 -# -#------------------------------------------------------------------------------- -use DBI; -use CGI; - -my $query = new CGI; -my $category_all = $query->param('allcat') + 0; -my $db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -my $host_name = ""; -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -my $DB = "DBI:mysql:$db_name:$host_name"; -my $User = 'bird'; -my $PassWord = 'bird2006'; -my $dbh = DBI->connect($DB, $User, $PassWord) || die "connect error \n"; - -print "Content-Type: text/plain\n\n"; - -# Total =================================================================== -outCount( '', 'site', 1, '' ); - -# Instrument Type ========================================================= -my $head = "INSTRUMENT:"; -my $val = ""; -my $sqlparam = ""; -my $sqltype = 0; -my @ans = MySql("SELECT DISTINCT INSTRUMENT_NO, INSTRUMENT_TYPE FROM INSTRUMENT ORDER BY INSTRUMENT_TYPE"); -foreach my $item ( @ans ) { - $val = "$$item[1]"; - $sqlparam = "WHERE R.INSTRUMENT_NO = '$$item[0]' "; - outCount( $head, $val, 0, $sqlparam ); -} - -# MS Type ================================================================= -if ( $category_all ) { - $head = "MS:"; - @ans = &MySql("SHOW FIELDS FROM RECORD LIKE 'MS_TYPE'"); - $cnt = @ans; - if ( $cnt != 0 ) { - @ans = &MySql("SELECT DISTINCT MS_TYPE FROM RECORD ORDER BY MS_TYPE"); - foreach my $item ( @ans ) { - $val = "$$item[0]"; - $sqlparam = "WHERE R.MS_TYPE = '$val' "; - if ( $val ne '' ) { - outCount( $head, $val, 0, $sqlparam ); - } - else { - outCount( $head, "Others", 0, $sqlparam ); - } - } - } - else { - outCount( $head, "Others", 0, "" ); - } -} - -# Merged Type =========================================================== -if ( $category_all ) { - $head = "MERGED:"; - outCount( $head, "Normal", 1, "WHERE INSTR(NAME, 'MERGED') = 0" ); - outCount( $head, "Merged", 1, "WHERE INSTR(NAME, 'MERGED') > 0" ); -} - -# Ion & Compound Name ===================================================== -$sqltype = 1; -my @params = ( 'Positive', 'Negative', - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', - 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1-9', 'Others'); -foreach my $val ( @params ) { - if ( $val eq 'Positive' || $val eq 'Negative' ) { - $head = "ION:"; - if ( $val eq 'Positive' ) { - $sqlparam = "WHERE S.ION > 0"; - } - elsif ( $val eq 'Negative' ) { - $sqlparam = "WHERE S.ION < 0"; - } - } - else { - $head = "COMPOUND:"; - if ( $val eq '1-9' ) { - $sqlparam = "WHERE S.NAME REGEXP '^[0-9]' "; - } - elsif ( $val eq 'Others' ) { - $sqlparam = "WHERE S.NAME REGEXP '^[^a-z0-9]' "; - } - else { - $sqlparam = "WHERE S.NAME LIKE '$val\%' "; - } - } - outCount( $head, $val, $sqltype, $sqlparam ); -} -$dbh->disconnect; -exit(0); - -sub outCount() { - my $head = $_[0]; - my $val = $_[1]; - my $sqltype = $_[2]; - my $sqlparam = $_[3]; - my $sql = getSql( $sqltype, $sqlparam ); - my @ans = &MySql($sql); - my $cnt = @ans; - if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); - } - foreach my $item ( @ans ) { - my $count = $$item[0]; - if ( $head eq "MS:" && $val eq "Others" && $count == 0 ) { next; } - print "$head$val\t$count\n"; - } -} - -sub getSql() { - my $sqltype = $_[0]; - my $sqlparam = $_[1]; - my @sqlstr = ("SELECT COUNT(*) FROM RECORD R $sqlparam", - "SELECT COUNT(*) FROM SPECTRUM S $sqlparam"); - return $sqlstr[$sqltype]; -} - -sub MySql() { - my $sql = $_[0]; - my @ans = (); - my @ret = (); - my $sth = $dbh->prepare($sql); - unless( $sth->execute ) { - return undef; - } - my $n = $sth->rows; - for ( my $i = 0; $i < $n; $i++ ) { my @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} -1; diff --git a/modules/apache/html/MassBank/cgi-bin/InstUtil.cgi b/modules/apache/html/MassBank/cgi-bin/InstUtil.cgi deleted file mode 100755 index 09c4a43c..00000000 --- a/modules/apache/html/MassBank/cgi-bin/InstUtil.cgi +++ /dev/null @@ -1,69 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# [Admin Tool] 分æžæ©Ÿå™¨æƒ…å ±ã®è¿½åŠ ãƒ»å‰Šé™¤å‡¦ç† -# -# ver 1.0.2 2008.12.05 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -$query = new CGI; -$act = $query->param('act'); -$inst_no = $query->param('inst_no'); -$inst_type = $query->param('inst_type'); -$inst_name = $query->param('inst_name'); -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -print "Content-Type: text/plain\n\n"; -if ( $act eq 'add') { - $sql = "insert INSTRUMENT(INSTRUMENT_NO, INSTRUMENT_TYPE, INSTRUMENT_NAME) " - . "values($inst_no, '$inst_type', '$inst_name')"; -} -elsif ( $act eq 'del') { - $sql = "delete from INSTRUMENT where INSTRUMENT_NO=$inst_no"; -} -else { - exit(0); -} - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($SQLDB, $User, $PassWord) || exit(0); -$sth = $dbh->prepare($sql); -unless( $sth->execute ) { - exit(0); -} -$sth->finish; -$dbh->disconnect; -print "ok"; -exit(0); -1; diff --git a/modules/apache/html/MassBank/cgi-bin/MolfileAPI.cgi b/modules/apache/html/MassBank/cgi-bin/MolfileAPI.cgi deleted file mode 100755 index a3589393..00000000 --- a/modules/apache/html/MassBank/cgi-bin/MolfileAPI.cgi +++ /dev/null @@ -1,146 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# Molfile情報å–å¾— -# -# ver 3.0.4 2009.08.20 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -print "Content-Type: text/plain\n\n"; - -#リクエストパラメータ補足 -# query : 検索値 -# qtype : 検索æ¡ä»¶ç¨®åˆ¥ -# i … ID検索 -# n … 化åˆç‰©å検索 -# s … 部分一致検索 -# obype : è¿”å´å€¤ç¨®åˆ¥ -# i … IDè¿”å´ -# n … 化åˆç‰©åè¿”å´ -# m … Molfileå†…å®¹è¿”å´ -# g … GifファイルIDåŠã³ãƒ•ã‚¡ã‚¤ãƒ«æœ‰ç„¡è¿”å´ -# q … GifファイルååŠã³Molfileåè¿”å´ï¼ˆå­˜åœ¨ã—ãªã„å ´åˆã¯N/A) -# dsn : DBå - -$query = new CGI; -$Query = $query->param('query'); -$Qtype = $query->param('qtype'); -$Otype = $query->param('otype'); -$DbName = $query->param('dsn'); -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $Host .= $_; -} -$DB = "DBI:mysql:$DbName:$Host"; -$User = 'bird'; -$PassWord = 'bird2006'; - -$MolDir = "../DB/molfile/$DbName"; -$GifDir = "../DB/gif/$DbName"; - -$Query =~ s/"/""/g; -if ( $Qtype eq 'i' ) { $cond = 'FILE="'.$Query.'"'; } -elsif ( $Qtype eq 'n' ) { $cond = 'NAME="'.$Query.'"'; } -elsif ( $Qtype eq 's' ) { $cond = 'UPPER(NAME) LIKE UPPER("%'.$Query.'%")'; } -else { &errorexit; } - -if ( $Otype =~ /i/ ) { $OutI = 1; } else { $OutI = 0; } -if ( $Otype =~ /n/ ) { $OutN = 1; } else { $OutN = 0; } -if ( $Otype =~ /m/ ) { $OutM = 1; } else { $OutM = 0; } -if ( $Otype =~ /g/ ) { $OutG = 1; } else { $OutG = 0; } -if ( $Otype =~ /q/ ) { $OutQ = 1; } else { $OutQ = 0; } - -$dbh = DBI->connect($DB, $User, $PassWord) || &errorexit; - -@ans = &MySql("SELECT * FROM MOLFILE WHERE $cond"); - -if ( $OutQ == 1 ) { - $gifFileName = "N/A"; - $molFileName = "N/A"; - foreach $x ( @ans ) { - ($id, $name) = @$x; - - if ( $gifFileName eq "N/A" ) { - if ( -f "$GifDir/$id.gif" ) { - $gifFileName = "$id.gif"; - } - } - if ( $molFileName eq "N/A" ) { - if ( -f "$MolDir/$id.mol" ) { - $molFileName = "$id.mol"; - } - } - if ( $gifFileName ne "N/A" && $molFileName ne "N/A" ) { - last; - } - } - print "$gifFileName\t$molFileName"; -} -else { - print scalar(@ans), "\n"; - foreach $x ( @ans ) { - ($id, $name) = @$x; - print "$id\n" if ( $OutI == 1 ); - print "$name\n" if ( $OutN == 1 ); - if ( $OutG == 1 ) { - if ( -f "$GifDir/$id.gif" ) { - print "$id\ttrue\n"; - } else { - print "$id\tfalse\n"; - } - } - next if ( $OutM == 0 ); - @mol = (); - open(F, "$MolDir/$id.mol"); - while ( ) { push(@mol, $_); } - close(F); - print scalar(@mol), "\n"; - foreach $x ( @mol ) { print $x; } - } -} - -$dbh->disconnect; -exit(0); - -sub errorexit() { - print "-1\n"; - exit(0); -} - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql) || &errorexit; - $sth->execute || &errorexit; - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish || &errorexit; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/MolfileDB/InsertData.pl b/modules/apache/html/MassBank/cgi-bin/MolfileDB/InsertData.pl deleted file mode 100755 index 749a5bbc..00000000 --- a/modules/apache/html/MassBank/cgi-bin/MolfileDB/InsertData.pl +++ /dev/null @@ -1,118 +0,0 @@ -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# Molfileãƒ†ãƒ¼ãƒ–ãƒ«ç™»éŒ²å‡¦ç† -# -# ver 1.0.2 2008.12.05 -# -#------------------------------------------------------------------------------- -use DBI; -use File::Basename; -use File::Spec; -scalar(@ARGV) >= 2 || die "perl InsertData.pl \n"; - -$Dir = shift(@ARGV); -$List = "list.tsv"; -$Prefix = shift(@ARGV); -$Path = dirname($0); -$DbTop = File::Spec->rel2abs( dirname($0) . "/../../" ); -open(F, "$DbTop/cgi-bin/DB_HOST_NAME"); -while ( ) { - chomp; - $Host .= $_; -} -$DbName = shift(@ARGV); -if ( $DbName eq '' ) { - $DbName = "MassBank"; -} -my $os = $^O; -print "OS : $os\n"; -print "Dir : $Dir\n"; -print "DbTop : $DbTop\n"; -print "Host : $Host\n"; -print "DbName: $DbName\n"; - -$DbDir = "$DbTop/DB/molfile/$DbName"; - -length($Prefix) == 2 || die "prefix must be 2 chars : $Prefix\n"; -(-d $DbDir) || die "dbdir error : $DbDir\n"; - -$DB = "DBI:mysql:$DbName:$Host"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($DB, $User, $PassWord) || die "connect error\n"; - -open(F, "$Dir/$List") || die "not found $Dir/$List\n"; - -$n = 0; -@ans = &MySql('select ifnull(max(substring(FILE,3)),0) + 1 from MOLFILE'); -$nid = $ans[0][0]; -while ( ) { - $n ++; - chop; - ($name0, $mol) = split("\t", $_); - $name = $name0; - $name =~ s/"/""/g; - @ans = &MySql('select FILE from MOLFILE where NAME="'.$name.'"'); - if ( scalar(@ans) > 0 ) { - print "$n : name '$name' exists already; NOT insert the data.\n"; - next; - } -again: - $id = sprintf('%s%06d', $Prefix, $nid); - @ans = &MySql('select NAME from MOLFILE where FILE="'.$id.'"'); - if ( scalar(@ans) > 0 ) { - print "$n : FILE '$id' exists already; try the next FILE.\n"; - $nid ++; - goto again; - } - $dbh->do('insert into MOLFILE values("'.$id.'","'.$name.'")'); - my $from = "\"$Dir/$Molfile/$mol\""; - my $to = "\"$DbDir/$id.mol\""; - if ( $os eq 'MSWin32' ) { - $from =~ s/\//\\/g; - $to =~ s/\//\\/g; - system("copy $from $to"); - } else { - system("cp $from $to"); - } - print "$n : '$name0' $mol ==> $id.mol\n"; - $nid ++; -} -close(F); -$dbh->disconnect; - -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - $sth->execute; - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/PeakSearch2.cgi b/modules/apache/html/MassBank/cgi-bin/PeakSearch2.cgi deleted file mode 100755 index 26b856e5..00000000 --- a/modules/apache/html/MassBank/cgi-bin/PeakSearch2.cgi +++ /dev/null @@ -1,232 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# Peak Search æ¤œç´¢å‡¦ç† -# -# ver 3.0.4 2011.08.24 -# -#------------------------------------------------------------------------------- -use DBI; -use CGI; - -print "Content-Type: text/plain\n\n"; - -my $query = new CGI; -my @params = $query->param(); -my $type = ""; -my $db_name = ""; -my @inst = (); -my @ms = (); -foreach $key ( @params ) { - $val = $query->param($key); - if ( $key eq 'id' ) { - push(@id, $val); - } - elsif ( $key eq 'type' ) { - $type = $val; - } - elsif ( $key eq 'dsn' ) { - $db_name = $val; - } - elsif ( $key eq 'ion' ) { - $where_ion = ""; - if ( $val eq '1' ) { - $where_ion = " AND S.ION > 0"; - } - elsif ( $val eq '-1' ) { - $where_ion = " AND S.ION < 0"; - } - } - elsif ( $key eq 'inst' ) { - @inst = $query->multi_param($key); - } - elsif ( $key eq 'ms' ) { - @ms = $query->multi_param($key); - } - elsif ( $key ne 'check' ) { - $Arg{$key} = $val; - } -} -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} -$DB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($DB, $User, $PassWord) || die "connect error \n"; - -$heap_tbl_name = 'PEAK_HEAP'; -$sql = "SHOW TABLES LIKE '$heap_tbl_name'"; -@ans = &MySql($sql); -$tbl_name = "PEAK"; -$ans_tbl_name = $ans[0][0]; -if ( lc($ans_tbl_name) eq lc($heap_tbl_name) ) { - $sql = "SELECT COUNT(*) FROM $heap_tbl_name"; - @ans = &MySql($sql); - $rec_cnt = $ans[0][0]; - if ( $rec_cnt > 0 ) { - $tbl_name = $heap_tbl_name; - } -} - -my $isInstAll = 0; -if ( $#inst >= 0 ) { - foreach $inst (@inst) { - if ( $inst eq 'all' ) { - $isInstAll = 1; - last; - } - } -} -else { - $isInstAll = 1; -} -if ( !$isInstAll ) { - for ( $i = 0; $i < @inst; $i ++ ) { - $where_inst .= " INSTRUMENT_TYPE='@inst[$i]'"; - if ($i != @inst -1) { - $where_inst .= " or"; - } - } - $sql = "SELECT INSTRUMENT_NO FROM INSTRUMENT WHERE" - . "$where_inst"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); - } - my $in = ""; - foreach $item ( @ans ) { - $inst_no = $$item[0]; - $in .= "$inst_no,"; - } - chop $in; - $where_inst = " AND R.INSTRUMENT_NO IN($in)"; -} - -my $isMsAll = 0; -if ( $#ms >= 0 ) { - foreach $ms (@ms) { - if ( $ms eq 'all' ) { - $isMsAll = 1; - last; - } - } -} -else { - $isMsAll = 1; -} -if ( !$isMsAll ) { - $sql = "SHOW FIELDS FROM RECORD LIKE 'MS_TYPE'"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); - } - my $in = ""; - for ( my $i=0; $i<@ms; $i++ ) { - $in .= "'@ms[$i]',"; - } - chop $in; - $where_ms .= " AND R.MS_TYPE IN($in)"; -} - -%res = (); -for ( $i = 0; $i < $Arg{'num'}; $i ++ ) { - $mz = $Arg{"mz$i"} + 0; - last if ( $mz eq 0 ); - $op = $Arg{"op$i"}; - $tol = $Arg{"tol$i"} + 0; - $tol = - $tol if ( $tol < 0 ); - $min = $mz - $tol - 0.00001; - $max = $mz + $tol + 0.00001; - $val = $Arg{"int$i"} + 0; - if ( $type eq 'diff' ) { - $sql = "SELECT t1.ID FROM $tbl_name AS t1 LEFT JOIN $tbl_name AS t2 ON t1.ID = t2.ID " - . "WHERE (t1.MZ BETWEEN t2.MZ + $min AND t2.MZ + $max) AND t1.RELATIVE > $val AND t2.RELATIVE > $val"; - } - else { - $sql = "SELECT ID FROM PEAK WHERE (MZ BETWEEN $min AND $max) AND RELATIVE > $val"; - } - @ans = &MySql($sql); - if ( $i != 0 ) { - if ( $op eq 'and' ) { %new = (); } - for $item ( @ans ) { - $id = $$item[0]; - if ( $op eq 'and' ) { - $new{$id} = '' if ( defined($res{$id}) ); - } - elsif ( $op eq 'or' ) { - $new{$id} = ''; - } - } - } - else { - %new = (); - for $item ( @ans ) { - $id = $$item[0]; - $new{$id} = ''; - } - } - %res = %new; -} -@id = sort keys(%res); -$cnt = @id; -if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); -} -%idlist = (); -%ionlist = (); -foreach $id ( @id ) { - $sql = "SELECT S.NAME, S.ID, S.ION, R.FORMULA, R.EXACT_MASS FROM SPECTRUM S, RECORD R " - . "WHERE S.ID = '$id' AND S.ID = R.ID" - . "$where_ion" - . "$where_inst" - . "$where_ms"; - @rec = &MySql($sql); - foreach $rec ( @rec ) { - print join("\t", @$rec), "\n"; - } -} -$dbh->disconnect; -exit(0); -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - unless( $sth->execute ) { - return undef; - } - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/QuickSearch.cgi b/modules/apache/html/MassBank/cgi-bin/QuickSearch.cgi deleted file mode 100755 index d5a7dfa6..00000000 --- a/modules/apache/html/MassBank/cgi-bin/QuickSearch.cgi +++ /dev/null @@ -1,230 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# Quick Search æ¤œç´¢å‡¦ç† -# -# ver 3.0.5 2011.08.24 -# -#------------------------------------------------------------------------------- -use DBI; -use CGI; - -$query = new CGI; -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -$DB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($DB, $User, $PassWord) || die "connect error \n"; - -print "Content-Type: text/plain\n\n"; - -my $query = new CGI; -my @params = $query->param(); -my @inst = (); -my @ms = (); -foreach $key ( @params ) { - $val = $query->param($key); - if ( $key eq 'id' ) { - push(@id, $val); - } - elsif ( $key eq 'display' ) { - $disp = $val; - } - elsif ( $key eq 'inst' ) { - @inst = $query->multi_param($key); - } - elsif ( $key eq 'ms' ) { - @ms = $query->multi_param($key); - } - elsif( $key ne 'check' ) { - $Arg{$key} = $val; - } -} - -my $where_ion = ""; -if ( $Arg{'ion'} eq '1' ) { - $where_ion = " and ion > 0"; -} -elsif ( $Arg{'ion'} eq '-1' ) { - $where_ion = " and ion < 0"; -} - -my $isInstAll = 0; -if ( $#inst >= 0 ) { - foreach $inst (@inst) { - if ( $inst eq 'all' ) { - $isInstAll = 1; - last; - } - } -} -else { - $isInstAll = 1; -} -if ( !$isInstAll ) { - my $where_inst = ""; - for ( my $i=0; $i<@inst; $i++ ) { - $where_inst .= " INSTRUMENT_TYPE='@inst[$i]'"; - if ($i != @inst -1) { - $where_inst .= " OR"; - } - } - $sql = "SELECT INSTRUMENT_NO FROM INSTRUMENT WHERE" - . "$where_inst"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); - } - my $in = ""; - foreach $item ( @ans ) { - $inst_no = $$item[0]; - $in .= "$inst_no,"; - } - chop $in; - - $where1 .= " R.INSTRUMENT_NO IN($in)"; -} - -my $isMsAll = 0; -if ( $#ms >= 0 ) { - foreach $ms (@ms) { - if ( $ms eq 'all' ) { - $isMsAll = 1; - last; - } - } -} -else { - $isMsAll = 1; -} -if ( !$isMsAll ) { - $sql = "SHOW FIELDS FROM RECORD LIKE 'MS_TYPE'"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); - } - my $in = ""; - for ( my $i=0; $i<@ms; $i++ ) { - $in .= "'@ms[$i]',"; - } - chop $in; - $where2 .= " R.MS_TYPE IN($in)"; -} - -if ( $Arg{'compound'} ne '' ) { - $compound = $Arg{'compound'}; - $compound =~ s/'/''/g; - $where3 = " N.NAME LIKE '\%$compound\%'"; -} - - -$tol = $Arg{'tol'} + 0; -$tol = - $tol if ( $tol < 0 ); -if ( $Arg{'mz'} ne '' ) { - $mz = $Arg{'mz'} + 0; - $mz1 = $mz - $tol - 0.00001; - $mz2 = $mz + $tol + 0.00001; - if ( $where3 ne '' ) { - $where3 .= " $Arg{'op1'}"; - } - $where3 .= " R.EXACT_MASS BETWEEN $mz1 AND $mz2"; -} - -if ( $Arg{'formula'} ne '' ) { - $formula = $Arg{'formula'}; - $formula =~ s/\*/%/g; - if ( $where3 ne '' ) { - $where3 .= " $Arg{'op2'}"; - } - $where3 .= " R.FORMULA LIKE '$formula'"; -} - -$sql = "SELECT DISTINCT R.ID, R.FORMULA, R.EXACT_MASS FROM RECORD R " - . "LEFT JOIN CH_NAME N ON R.ID = N.ID"; -if ( $where1 ne '' ) { - $sql .= " WHERE ($where1)"; -} -if ( $where2 ne '' ) { - if ( $where1 eq '' ) { - $sql .= " WHERE "; - } - else { - $sql .= " AND "; - } - $sql .= "$where2"; -} -if ( $where3 ne '' ) { - if ( $where1 eq '' && $where2 eq '' ) { - $sql .= " WHERE "; - } - else { - $sql .= " AND "; - } - $sql .= "($where3)"; -} - -@ans = &MySql($sql); -$cnt = @ans; -if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); -} -foreach $item ( @ans ) { - $id = $$item[0]; - $formula = $$item[1]; - $emass= $$item[2]; - $sql = "SELECT NAME, ID, ION FROM SPECTRUM WHERE ID = '$id'" - . "$where_ion"; - @rec = &MySql($sql); - foreach $rec ( @rec ) { - print join("\t", @$rec), "\t$formula\t$emass\n"; - } -} -$dbh->disconnect; -exit(0); - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - unless( $sth->execute ) { - return undef; - } - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} - -1; diff --git a/modules/apache/html/MassBank/cgi-bin/RecordIndex.cgi b/modules/apache/html/MassBank/cgi-bin/RecordIndex.cgi deleted file mode 100755 index 2bb8cf5a..00000000 --- a/modules/apache/html/MassBank/cgi-bin/RecordIndex.cgi +++ /dev/null @@ -1,191 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# レコードリスト別ã®ã‚µãƒžãƒªãƒ¼æƒ…å ±å–å¾— -# -# ver 3.0.2 2011.06.02 -# -#------------------------------------------------------------------------------- -use DBI; -use CGI; - -$query = new CGI; -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -$host_name = ""; -while ( ) { - chomp; - $host_name .= $_; -} - -$DB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -$dbh = DBI->connect($DB, $User, $PassWord) || die "connect error \n"; - -print "Content-Type: text/plain\n\n"; - -$query = new CGI; -@params = $query->param(); - -foreach $key ( @params ) { - $val = $query->param($key); - $Arg{$key} = $val; -} - -# IndexType -> Contributor -if ( $Arg{'idxtype'} eq 'site') { - $sqlparam = ""; - $sql = getSql( 1, $sqlparam ); -} - -# IndexType -> Instrument Type -elsif ( $Arg{'idxtype'} eq 'inst' ) { - $sql = "SELECT INSTRUMENT_NO FROM INSTRUMENT WHERE INSTRUMENT_TYPE='$Arg{'srchkey'}'"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); - } - foreach $item ( @ans ) { - $inst_no = $$item[0]; - $in .= "$inst_no,"; - } - chop $in; - $sqlparam = "WHERE R.INSTRUMENT_NO IN($in)"; - $sql = getSql( 0, $sqlparam ); -} - -# IndexType -> MS Type -elsif ( $Arg{'idxtype'} eq 'ms' ) { - if ( $Arg{'srchkey'} ne 'Others' ) { - $sql = "SHOW FIELDS FROM RECORD LIKE 'MS_TYPE'"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); - } - $sqlparam .= "WHERE R.MS_TYPE='$Arg{'srchkey'}'"; - $sql = getSql( 0, $sqlparam ); - } - else { - $sql = "SHOW FIELDS FROM RECORD LIKE 'MS_TYPE'"; - @ans = &MySql($sql); - $cnt = @ans; - if ( $cnt != 0 ) { - $sqlparam .= "WHERE R.MS_TYPE=''"; - $sql = getSql( 0, $sqlparam ); - } - else { - $sql = getSql( 0, "" ); - } - } -} - -# IndexType -> Merged Type -elsif ( $Arg{'idxtype'} eq 'merged' ) { - if ( $Arg{'srchkey'} eq 'Normal' ) { - $sqlparam = "WHERE INSTR(NAME, 'MERGED') = 0"; - } - elsif ( $Arg{'srchkey'} eq 'Merged' ) { - $sqlparam = "WHERE INSTR(NAME, 'MERGED') > 0"; - } - $sql = getSql( 1, $sqlparam ); -} - -# IndexType -> Ionization Mode -elsif ( $Arg{'idxtype'} eq 'ion' ) { - if ( $Arg{'srchkey'} eq 'Positive' ) { - $sqlparam = "WHERE S.ION > 0"; - } - elsif ( $Arg{'srchkey'} eq 'Negative' ) { - $sqlparam = "WHERE S.ION < 0"; - } - $sql = getSql( 0, $sqlparam ); -} - -# IndexType -> Compound Name -elsif ( $Arg{'idxtype'} eq 'cmpd' ) { - # Condition -> 0-9 - if ( $Arg{'srchkey'} eq '1-9' ) { - $sqlparam = "WHERE NAME REGEXP '^[0-9]' "; - $sql = getSql( 1, $sqlparam ); - } - # Condition -> other - elsif ( $Arg{'srchkey'} eq 'Others' ) { - $sqlparam = "WHERE NAME REGEXP '^[^a-z0-9]' "; - $sql = getSql( 1, $sqlparam ); - } - # Condition -> a-z - else { - $sqlparam = "WHERE NAME LIKE '$Arg{'srchkey'}\%' "; - $sql = getSql( 1, $sqlparam ); - } -} - -@ans = &MySql( $sql ); -$cnt = @ans; -if ( $cnt == 0 ) { - $dbh->disconnect; - exit(0); -} -foreach $item ( @ans ) { - print join("\t", @$item), "\n"; -} -$dbh->disconnect; -exit(0); - - -sub getSql() { - local(@tmp) = @_; - $sqltype = @tmp[0]; - $sqlparam = @tmp[1]; - @sqlstr = ("SELECT Tmp.name, Tmp.id, Tmp.ion, Tmp.formula, Tmp.emass FROM " - . "( SELECT DISTINCT S.ID AS id, R.FORMULA AS formula, R.EXACT_MASS AS emass, S.NAME AS name, S.ION AS ion " - . "FROM SPECTRUM S " - . "LEFT JOIN RECORD R ON S.ID = R.ID " - . "LEFT JOIN CH_NAME N ON R.ID = N.ID " - . "$sqlparam) AS Tmp", - "SELECT S.NAME, S.ID, S.ION, R.FORMULA, R.EXACT_MASS " - . "FROM SPECTRUM S LEFT JOIN RECORD R ON S.ID = R.ID " - . "$sqlparam"); - return @sqlstr[$sqltype]; -} - - -sub MySql() { local($sql) = @_; - local($sth, $n, $i, @ans, @ret); - @ret = (); - $sth = $dbh->prepare($sql); - unless( $sth->execute ) { - return undef; - } - $n = $sth->rows; - for ( $i = 0; $i < $n; $i ++ ) { @ans = $sth->fetchrow_array; push(@ret, [@ans]); } - $sth->finish; - return @ret; -} -1; diff --git a/modules/apache/html/MassBank/cgi-bin/ServerCheck.cgi b/modules/apache/html/MassBank/cgi-bin/ServerCheck.cgi deleted file mode 100755 index 62778fd0..00000000 --- a/modules/apache/html/MassBank/cgi-bin/ServerCheck.cgi +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# サーãƒçŠ¶æ…‹ãƒã‚§ãƒƒã‚¯ãƒ—ログラム -# -# ver 1.0.0 2009.01.26 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; - -print "Content-Type: text/plain\n\n"; -$query = new CGI; -$db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -open(F, "DB_HOST_NAME"); -while ( ) { - chomp; - $host_name .= $_; -} - -$SQLDB = "DBI:mysql:$db_name:$host_name"; -$User = 'bird'; -$PassWord = 'bird2006'; -unless ( $dbh = DBI->connect($SQLDB, $User, $PassWord) ) { - print "NG"; - exit(0); -} -$sql = "select count(*) from SPECTRUM"; -$sth = $dbh->prepare($sql); -unless( $sth->execute ) { - print "NG"; - exit(0); -} -$sth->finish; -$dbh->disconnect; -print "OK"; -exit(0); diff --git a/modules/apache/html/MassBank/cgi-bin/StructureSearch.cgi b/modules/apache/html/MassBank/cgi-bin/StructureSearch.cgi deleted file mode 100755 index c965529d..00000000 --- a/modules/apache/html/MassBank/cgi-bin/StructureSearch.cgi +++ /dev/null @@ -1,343 +0,0 @@ -#! /usr/bin/perl -#------------------------------------------------------------------------------- -# -# Copyright (C) 2008 JST-BIRD MassBank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#=============================================================================== -# -# 部分構造検索クライアント -# -# ver 1.0.9 2011.08.24 -# -#------------------------------------------------------------------------------- -use CGI; -use DBI; -use Socket; -use File::Temp(); - -my $BASE_PATH = "../StructureSearch/"; -# テンãƒãƒ©ãƒªãƒ•ã‚¡ã‚¤ãƒ«æ ¼ç´ãƒ‘ス -my $TMP_PATH = $BASE_PATH . "temp/"; -print "Content-Type: text/plain\n\n"; - -#------------------------------------------------ -# リクエストパラメータå–å¾— -#------------------------------------------------ -my $query = new CGI; -my @params = $query->param(); -my @moldata = (); -my @mz_list = (); -my $tol = ""; -my $pi_check = 1; -my @inst_list = (); -my @ms_list = (); -my $ion = "1"; -foreach my $key ( @params ) { - my $val = $query->param($key); - if ( $val ne '' ) { - if ( index($key, 'moldata') >= 0 ) { - push(@moldata, $val); - } - elsif ( index($key, 'mz') >= 0 ) { - push(@mz_list, $val); - } - elsif ( $key eq 'tol' ) { - $tol = $val; - } - elsif ( $key eq 'pi_check' ) { - $pi_check = $val; - } - elsif ( $key eq 'inst') { - @inst_list = $query->param($key); - } - elsif ( $key eq 'ms' ) { - @ms_list = $query->param($key); - } - elsif ( $key eq 'ion' ) { - $ion = $val; - } - } -} - -# DBåセット -my $db_name = $query->param('dsn'); -if ( $db_name eq '' ) { - $db_name = "MassBank"; -} -# DBホストåå–å¾— -open(F, "DB_HOST_NAME"); -my $host_name = ""; -while ( ) { - chomp; - $host_name .= $_; -} -close(F); - -my $port_no = "50000"; -if ( open(F, $BASE_PATH . "SOCKET_PORT") ) { - while ( ) { - if ( $_ =~ /^([0-9]*)$/ ) { - $port_no = $_; - } - last; - } - close(F); -} - -#------------------------------------------------ -# DB接続 -#------------------------------------------------ -my $DB = "DBI:mysql:$db_name:$host_name"; -my $User = 'bird'; -my $PassWord = 'bird2006'; -my $dbh = DBI->connect($DB, $User, $PassWord) or die "DB connect error \n"; - -#------------------------------------------------ -# INSTRUMENT_NOå–å¾— -#------------------------------------------------ -my $inst_no = ""; -my $isFound = true; -if ( $#inst_list != -1 ) { - my @inst_list2 = (); - foreach my $inst ( @inst_list ) { - push(@inst_list2, "'$inst'"); - } - my $in = join(",", @inst_list2); - $sql = "SELECT INSTRUMENT_NO FROM INSTRUMENT WHERE INSTRUMENT_TYPE IN($in)"; - @rec = &MySql($sql); - if ( $#rec == -1 ) { - $dbh->disconnect; - exit; - } - else { - my @inst_no_list = (); - foreach my $item ( @rec ) { - push(@inst_no_list, $$item[0]); - } - $inst_no = join(",", @inst_no_list); - } -} - -#------------------------------------------------ -# MS_TYPEå–å¾— -#------------------------------------------------ -my $isMsAll = 0; -my $ms_type = ""; -if ( $#ms_list >= 0 ) { - foreach $ms (@ms_list) { - if ( $ms eq 'all' ) { - $isMsAll = 1; - last; - } - } -} -else { - $isMsAll = 1; -} -if ( !$isMsAll ) { - $sql = "SHOW FIELDS FROM RECORD LIKE 'MS_TYPE'"; - @rec = &MySql($sql); - $cnt = @ans; - if ( $#rec == -1 ) { - $dbh->disconnect; - exit; - } - for ( my $i=0; $i<@ms_list; $i++ ) { - $ms_type .= "'@ms_list[$i]',"; - } - chop $ms_type; -} - -#------------------------------------------------ -# molfileデータをテンãƒãƒ©ãƒªãƒ•ã‚¡ã‚¤ãƒ«ã«ä¿å­˜ -#------------------------------------------------ -my @qfname_list = (); -foreach my $data (@moldata) { - my $TMP = File::Temp->new( DIR => $TMP_PATH, - TEMPLATE => 'query_XXXXXX', - SUFFIX => '.mol', - UNLINK => 0 ) - or die( "temp file create error : $!\n"); - my $file_path = $TMP->filename; - $TMP->print($data) or die( "temp file write error : $!\n"); - $TMP->close(); - push(@qfname_list, $file_path); -} - - -#------------------------------------------------ -# パラメータセット -#------------------------------------------------ -# クエリファイル数セット -my $query_num = scalar(@qfname_list); -my $query = ""; -# クエリファイルåセット -foreach my $file_path ( @qfname_list ) { - my $file_name = $file_path; - my $pos = -1; - my $separator = ''; - if ( $file_path =~ /\\/ ) { - $separator = '\\'; - } - elsif ( $file_path =~ /\// ) { - $separator = '/'; - } - if ( $separator ne '' ) { - $pos = rindex( $file_path, $separator ); - if ( $pos >= 0 ) { - $file_name = substr( $file_path, $pos+1, length($file_path)-($pos+1) ); - } - } - $query .= "\t$file_name"; -} - -my $param = "$pi_check\t$query_num$query\t$db_name\n"; -#------------------------------------------------ -# UNIXãƒ‰ãƒ¡ã‚¤ãƒ³ã‚½ã‚±ãƒƒãƒˆä½œæˆ -#------------------------------------------------ -my $iaddr = inet_aton("localhost") - or die("no host : $!\n"); - -my $sock_addr = pack_sockaddr_in($port_no, $iaddr); - -socket(SOCK, PF_INET, SOCK_STREAM, 0) - or die("socket error : $!\n"); - -#------------------------------------------------ -# ソケット接続 -#------------------------------------------------ -connect(SOCK, $sock_addr) - or die("connect error : $!\n"); - -#------------------------------------------------ -# サーãƒã¸ãƒ‘ラメータをé€ä¿¡ -#------------------------------------------------ -autoflush SOCK 1; -print SOCK $param; - -#------------------------------------------------ -# サーãƒã‹ã‚‰ãƒ¬ã‚¹ãƒãƒ³ã‚¹(ヒットã—ãŸIDリスト)ã‚’å—ä¿¡ -#------------------------------------------------ -my $res = ""; -while () { - $res .= $_; -} -# ソケットを閉ã˜ã‚‹ -close(SOCK); - -#------------------------------------------------ -# テンãƒãƒ©ãƒªãƒ•ã‚¡ã‚¤ãƒ«å‰Šé™¤ -#------------------------------------------------ -foreach my $file_path ( @qfname_list ) { - unlink($file_path); -} - -#------------------------------------------------ -# レスãƒãƒ³ã‚¹ã‚’タブ区切りã§åˆ†è§£ -#------------------------------------------------ -if ( $res eq '' ) { - $dbh->disconnect; - exit; -} -# 最後ã®ã‚¿ãƒ–ã‚’å–り除ã -$res = substr($res, 0, length($res) - 1); -my @molname_list = split('\t', $res); -if ( scalar(@molname_list) < 1 ) { - $dbh->disconnect; - exit; -} - -#------------------------------------------------ -# Peak Searchパラメータセット -#------------------------------------------------ -my @mz_range = (); -my $mz_num = $#mz_list; -for my $i ( 0 .. $mz_num ) { - my $mz = $mz_list[$i]; - my $min = $mz - ($tol + 0.00001); - my $max = $mz + ($tol + 0.00001); - push(@mz_range, "MZ BETWEEN $min AND $max"); -} - -#------------------------------------------------ -# 化åˆç‰©åをキーã«ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰IDã‚’å–å¾— -#------------------------------------------------ -my $sql = ""; -my @rec = (); -my @id_list = (); -foreach my $molname ( @molname_list ) { - $sql = "SELECT S.ID FROM MOLFILE M, SPECTRUM S WHERE M.FILE = '$molname' " - . "AND M.NAME = SUBSTRING(S.NAME,1,INSTR(S.NAME,';')-1)"; - @rec = &MySql($sql); - foreach my $item ( @rec ) { - push(@id_list, $$item[0]); - } -} - -if ( $isFound eq true ) { - #------------------------------------------------ - # SPECTRUM, RECORDテーブルより項目をå–å¾— - #------------------------------------------------ - foreach my $id ( @id_list ) { - # Peak Search - if ( $mz_num >= 0 ) { - $sql = "SELECT COUNT(MZ) FROM PEAK WHERE ID = '$id'"; - foreach my $range ( @mz_range ) { - $sql .= " AND EXISTS(SELECT MZ FROM PEAK WHERE ID = '$id' AND $range)"; - } - @rec = &MySql($sql); - if ( int($rec[0][0]) == 0 ) { - next; - } - } - - $sql = "SELECT S.NAME, S.ID, S.ION, R.FORMULA, R.EXACT_MASS " - . "FROM SPECTRUM S, RECORD R WHERE S.ID = '$id' AND S.ID = R.ID"; - - if ( $inst_no ne '' ) { - $sql .= " AND R.INSTRUMENT_NO IN($inst_no)"; - } - if ( $ms_type ne '' ) { - $sql .= " AND R.MS_TYPE IN($ms_type)"; - } - if ( $ion != 0 ) { - $sql .= " AND S.ION = $ion"; - } - @rec = &MySql($sql); - foreach my $rec ( @rec ) { - print join("\t", @$rec), "\n"; - } - } -} - -$dbh->disconnect; -exit; - -sub MySql() { - my $sql = $_[0]; - my @ans = (); - my @ret = (); - my $sth = $dbh->prepare($sql); - $sth->execute or exit(0); - my $n = $sth->rows; - for ( my $i = 0; $i < $n; $i ++ ) { - @ans = $sth->fetchrow_array; - push(@ret, [@ans]); - } - $sth->finish; - return @ret; -} diff --git a/modules/apache/html/MassBank/manuals/MassBankRecordFormat_en.pdf b/modules/apache/html/MassBank/manuals/MassBankRecordFormat_en.pdf deleted file mode 100644 index 3cb03e99..00000000 Binary files a/modules/apache/html/MassBank/manuals/MassBankRecordFormat_en.pdf and /dev/null differ diff --git a/modules/apache/html/MassBank/manuals/UserManual_en.pdf b/modules/apache/html/MassBank/manuals/UserManual_en.pdf deleted file mode 100644 index 406d6e97..00000000 Binary files a/modules/apache/html/MassBank/manuals/UserManual_en.pdf and /dev/null differ diff --git a/modules/apache/html/MassBank/manuals/UserManual_ja.pdf b/modules/apache/html/MassBank/manuals/UserManual_ja.pdf deleted file mode 100644 index f948310c..00000000 Binary files a/modules/apache/html/MassBank/manuals/UserManual_ja.pdf and /dev/null differ diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/api_ref.css b/modules/apache/html/MassBank/manuals/api-doc_en/api_ref.css deleted file mode 100644 index 072a8467..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/api_ref.css +++ /dev/null @@ -1,71 +0,0 @@ -@charset "UTF-8"; -/******************************************************************************* - * - * Copyright (C) 2010 JST-BIRD MassBank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ******************************************************************************* - * - * CSS for WEB-API References - * - * ver 1.0.0 2010.01.25 - * - ******************************************************************************/ - -* { font-family: "Meiryo", "Verdana", "Arial", "Trebuchet MS", "MS Gothic", sans-serif; font-style:normal; } - -body, div, p, hr, ul, ol, li, table, th, td, thead, tbody, tfoot, form, pre -{ font-size:10pt; } - -h1 -{ font-size:14pt; } - -a, img { border:0; } -a, a:link, a:visited { color:blue; text-decoration: underline;} -a:hover, a:active{ color:blue; text-decoration: underline;} - -p { text-indent: 1em; line-height:0; } - -hr { - height: 1px; - border: none; - border-top: 1px silver solid; -} - - -.src { - width:800px; - border:1px silver solid; - background-color:WhiteSmoke; - padding:5px; -} - -.res1 { - width:400px; - border:1px silver solid; - background-color:MintCream; - padding:8px; -} -.res2 { - width:800px; - border:1px silver solid; - background-color:MintCream; - padding:8px; -} - -.head { - color:dimgray; -} diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/getInst.php b/modules/apache/html/MassBank/manuals/api-doc_en/getInst.php deleted file mode 100644 index 72dad694..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/getInst.php +++ /dev/null @@ -1,50 +0,0 @@ - - - -getInstrumentTypes Method - - - -MassBank WEB-API References -
-

getInstrumentTypes Method

-Get a list of the instrument types.
-
-Parameter
-(none)
-
-Response
-array of string
-

- -
-PHP Sample Code
-
-
-// call method
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-$res = $soap->getInstrumentTypes();
-
-// display obtained data
-for ($i = 0 ; $i < count($res->return); $i++) {
-	echo $res->return[$i] . "<br>";
-}
-
-
-
-
-Obtained Data (the above code is excecuted actually)
-
-getInstrumentTypes(); - -// display obtained data -for ($i = 0 ; $i < count($res->return); $i++) { - echo $res->return[$i] . "
\n"; -} -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/getPeak.php b/modules/apache/html/MassBank/manuals/api-doc_en/getPeak.php deleted file mode 100644 index 79a3a69e..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/getPeak.php +++ /dev/null @@ -1,89 +0,0 @@ - - - -getPeak Method - - - -MassBank WEB-API References -
-

getPeak Method

-Get the peak data of MassBank records specified by Record IDs.
-
-Parameter
-ids : MassBank IDs to get peak data. [type: array of string]

-Response
-Array of Peak (the following structure)
-  - id : MassBank IDs obtained. [type: string]
-  - numPeaks : Number of peaks [type: int]
-  - mzs : values of m/z [type: array of string]
-  - intensities : values of intensity [type: array of string]
-

- -
-PHP Sample Code
-
-
-// set parameters
-$ids = array("PR020001", "PR020002", "PR020003", "FU000001" );
-$params = array("ids" => $ids );
-
-// call method
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-try {
-	$res = $soap->getPeak( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// display obtained data
-$ret = $res->return;
-for ($i = 0 ; $i < count($ret); $i++) {
-	echo "[" . $ret[$i]->id . "]<br>\n";
-	echo "NUM_PEAK:" . $ret[$i]->numPeaks . "<br>\n";
-	for ($j = 0 ; $j < count($ret[$i]->mzs); $j++) {
-		$mz = $ret[$i]->mzs[$j];
-		$inte = $ret[$i]->intensities[$j];
-		echo "mz:$mz, inte:$inte<br>\n";
-	}
-	echo "<br><br>\n";
-}
-
-
-
-
-Obtained Data (the above code is executed actually)
-
- $ids ); - -// call method -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->getPeak( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// display obtained data -$ret = $res->return; -for ($i = 0 ; $i < count($ret); $i++) { - echo "[" . $ret[$i]->id . "]
\n"; - echo "NUM_PEAK:" . $ret[$i]->numPeaks . "
\n"; - for ($j = 0 ; $j < count($ret[$i]->mzs); $j++) { - $mz = $ret[$i]->mzs[$j]; - $inte = $ret[$i]->intensities[$j]; - echo "mz:$mz, inte:$inte
\n"; - } - echo "

\n"; -} -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/getRecordInfo.php b/modules/apache/html/MassBank/manuals/api-doc_en/getRecordInfo.php deleted file mode 100644 index c8eb465f..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/getRecordInfo.php +++ /dev/null @@ -1,72 +0,0 @@ - - - -getRecordInfo Method - - - -MassBank WEB-API References -
-

getRecordInfo Method

-Get the data of MassBank records specified by Record IDs.
-
-Parameter
-ids : MassBank IDs of records to get. [type: array of string] -

-Response
-Array of RecordInfo (the following structure)
-  - id : MassBank IDs of obtained records [type: string]
-  - info : Record information [type: string]
-

- -
-PHP Sample Code
-
-
-// set parameters
-$ids = array("KOX00001", "KOX00002", "TY000040", "FU000001" );
-$params = array("ids" => $ids );
-
-// call method
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-try {
-	$res = $soap->getRecordInfo( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// display obtained data
-$ret = $res->return;
-for ($i = 0 ; $i < count($ret); $i++) {
-	$info = str_replace("\n", "<br>", $ret[$i]->info );
-	echo "[" . $ret[$i]->id . "]<br>\n";
-	echo $info . "<br><br>\n";
-}
-
-
-
-
-Obtained Data (the above code is executed actually)
-
- $ids ); - -// call method -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -$res = $soap->getRecordInfo( $params ); - -// display obtained data -$ret = $res->return; -for ($i = 0 ; $i < count($ret); $i++) { - $info = str_replace("\n", "
", $ret[$i]->info ); - echo "[" . $ret[$i]->id . "]
\n"; - echo $info . "

\n"; -} -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/reference.html b/modules/apache/html/MassBank/manuals/api-doc_en/reference.html deleted file mode 100644 index 6eac1709..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/reference.html +++ /dev/null @@ -1,34 +0,0 @@ - - - -MassBank | Manual | WEB-API References - - - -

MassBank WEB-API References

-
-Schema (WSDL)
-http://www.massbank.jp/api/services/MassBankAPI?wsdl -

-
-
-Methods
-getInstrumentTypes -

Get a list of the instrument types.

-
-getRecordInfo -

Get the data of MassBank records specified by Record IDs.

-
-getPeak -

Get the peak data of MassBank records specified by Record IDs.

-
-searchSpectrum -

Get the response equivalent to the "Spectrum Search" results.

-
-searchPeak -

Get the response equivalent to the "Peak Search" results.

-
-searchPeakDiff -

Get the response equivalent to the "Peak Difference Search" results.

-
-
diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/searchPeak.php b/modules/apache/html/MassBank/manuals/api-doc_en/searchPeak.php deleted file mode 100644 index 3c0f7dc7..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/searchPeak.php +++ /dev/null @@ -1,143 +0,0 @@ - - - -searchPeak Method - - - -MassBank WEB-API References -
-

searchPeak Method

-Get the response equivalent to the "Peak Search" results.
-
-Parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - -
mzs[type: array of string]values of m/z of peaks
relativeIntensity[type: string]value of relative intensity of peaks
tolerance[type: string]Tolerance.
cutoff[type: string]Ignore peaks whose intensity is not larger than the value of cutoff.
instrumentTypes[type: array of string] -Specify one or more instrument types. Not to restrict instrument types, specify "all".
-Do not specify the values obtained by getInstrumentTypes method.
-
ionMode[type: string] -Ionization mode
-Specify one of "Positive", "Negative" or "Both" (case is ignored)
-
maxNumResults[type: int]Maximum number of search results. "0" means unspecified and then all results are obtained.
- -

-Response
-Array of SearchResult (the following structure)
-  |
-  + numResults : Number of search results [type: int]
-  + Array of Result (the following structure)
-        |
-        + id : MassBank ID [type: string]
-        | title : Record Title [type: string]
-        | formula : Molecular formula [type: string]
-        + exactMass : Exact mass [type: string]
-

- -
-PHP Sample Code
-
-
-// set parameters
-$mzs = array('80', '85');
-$inte = "200";
-$tol = "0.3";
-$inst = array("all");
-$ion = "Both";
-$params = array(
-	"mzs" => $mzs, "relativeIntensity" => $inte,   "tolerance" => $tol,
-	"instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0
-);
-
-// call method
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-try {
-	$res = $soap->searchPeak( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// display obtained data
-$ret = $res->return;
-echo "<table>\n";
-for ($i = 0 ; $i < $ret->numResults; $i++) {
-	$info = $ret->results[$i];
-	echo "\n";
-	echo "$info->title";
-	echo "$info->formula";
-	echo "$info->exactMass";
-	echo "$info->id\n";
-	echo "\n";
-}
-echo "</table>\n";
-
-
-
-
-Obtained Data (the above code is executed actually)
-
- $mzs, "relativeIntensity" => $inte, "tolerance" => $tol, - "instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0 -); - -// call method -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->searchPeak( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// display obtained data -$ret = $res->return; -echo "\n"; -for ($i = 0 ; $i < $ret->numResults; $i++) { - $info = $ret->results[$i]; - echo "\n"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; -} -echo "
$info->title$info->formula$info->exactMass$info->id
\n"; -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/searchPeakDiff.php b/modules/apache/html/MassBank/manuals/api-doc_en/searchPeakDiff.php deleted file mode 100644 index ec4a8b97..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/searchPeakDiff.php +++ /dev/null @@ -1,143 +0,0 @@ - - - -searchPeakDiff Method - - - -MassBank WEB-API References -
-

searchPeakDiff Method

-Get the response equivalent to the "Peak Difference Search" results.
-
-Parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - -
mzs[type: array of string]values of m/z of peaks
relativeIntensity[type: array of string]values of relative intensity of peaks
tolerance[type: string]Tolerance.
cutoff[type: string]Ignore peaks whose intensity is not larger than the value of cutoff.
instrumentTypes[type: array of string] -Specify one or more instrument types. Not to restrict instrument types, specify "all".
-Do not specify the values obtained by getInstrumentTypes method.
-
ionMode[type: string] -Ionization mode
-Specify one of "Positive", "Negative" or "Both" (case is ignored)
-
maxNumResults[type: int]Maximum number of search results. "0" means unspecified and then all results are obtained.
- -

-Response
-Array of SearchResult (the following structure)
-  |
-  + numResults : Number of search results [type: int]
-  + Array of Result (the following structure)
-        |
-        + id : MassBank ID [type: string]
-        | title : Record Title [type: string]
-        | formula : Molecular formula [type: string]
-        + exactMass : Exact mass [type: string]
-

- -
-PHP Sample Code
-
-
-// set parameters
-$mzs = array('80', '85');
-$inte = "100";
-$tol = "0.3";
-$inst = array("all");
-$ion = "Negative";
-$params = array(
-	"mzs" => $mzs, "relativeIntensity" => $inte,   "tolerance" => $tol,
-	"instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0
-);
-
-// call method
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-try {
-	$res = $soap->searchPeakDiff( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// display obtained data
-$ret = $res->return;
-echo "<table>\n";
-for ($i = 0 ; $i < $ret->numResults; $i++) {
-	$info = $ret->results[$i];
-	echo "\n";
-	echo "$info->title";
-	echo "$info->formula";
-	echo "$info->exactMass";
-	echo "$info->id\n";
-	echo "\n";
-}
-echo "</table>\n";
-
-
-
-
-Obtained Data (the above code is executed actually)
-
- $mzs, "relativeIntensity" => $inte, "tolerance" => $tol, - "instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0 -); - -// call method -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->searchPeakDiff( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// display obtained data -$ret = $res->return; -echo "\n"; -for ($i = 0 ; $i < $ret->numResults; $i++) { - $info = $ret->results[$i]; - echo "\n"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; -} -echo "
$info->title$info->formula$info->exactMass$info->id
\n"; -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_en/searchSpectrum.php b/modules/apache/html/MassBank/manuals/api-doc_en/searchSpectrum.php deleted file mode 100644 index f51e5401..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_en/searchSpectrum.php +++ /dev/null @@ -1,162 +0,0 @@ - - - -searchSpectrum Method - - - -MassBank WEB-API References -
-

searchSpectrum Method

-Get the response equivalent to the "Spectrum Search" results.
-
-Parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mzs[type]array of stringvalues of m/z of peaks
intensities[type]array of stringvalues of intensity of peaks
unit[type]stringUnit of tolerance. Specify "unit" or "ppm". (Default: "unit")
tolerance[type]stringTolerance of values of m/z of peaks. (Default: 0.3 unit or 50 ppm)
cutoff[type]stringIgnore peaks whose intensity is not larger than the value of cutoff. (Default: 50)
instrumentTypes[type]array of string -Specify one or more instrument types. Not to restrict instrument types, specify "all".
-Do not specify other than the values obtained by getInstrumentTypes method.
-
ionMode[type]string -Ionization mode
-Specify one of "Positive", "Negative" or "Both" (case is ignored)
-
maxNumResults[type]intMaximum number of search results. "0" means unspecified and then all results are obtained.
- -

-Response
-Array of  SearchResult (the following structure)
- - -
-  - numResults : Number of search results [type]int
-  - results : Inforamation of search results  Array of Result (the following structure)
-        |
-        + id : MassBank ID [type]string
-        + title : Record title [type]string
-        | formula : Molecular formula [type]string
-        | exactMass : Exact mass [type]string
-        + score : Score [type]string
-
-
-Exception
-Error Message
-"Invalid parameter : xxxxx" : when an invalid parameter is specified -

- -
-
-PHP Sample Code
-
-
-// set parameters
-$mzs = array('273.096', '289.086', '290.118', '291.096', '292.113', '579.169', '580.179');
-$inte = array('300', '300', '300', '300', '300', '300', '300' );
-$unit = "";		// unit is optional (default: "unit")
-$tol = "";			// tolerance is optional (default: "0.3")
-$cutoff = "";		// cutoff is optional (default: "50")
-$inst = array("all");
-$ion = "Positive";
-$params = array(
-	"mzs" => $mzs, "intensities" => $inte,   "unit" => $unit,
-	"tolerance" => $tol, "cutoff" => $cutoff, "instrumentTypes" => $inst,
-	"ionMode" => $ion, "maxNumResults" => 20
-);
-
-// call method
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-try {
-	$res = $soap->searchSpectrum( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// display obtained data
-$ret = $res->return;
-echo "<table>\n";
-for ($i = 0 ; $i < $ret->numResults; $i++) {
-	$info = $ret->results[$i];
-	echo "<tr>\n";
-	echo "<td>$info->score</td>";
-	echo "<td>$info->title</td>";
-	echo "<td>$info->formula</td>";
-	echo "<td>$info->exactMass</td>";
-	echo "<td>$info->id</td>\n";
-	echo "</tr>\n";
-}
-echo "</table>\n";
-
-
-
-
-Obtained Data (the above code is executed actually)
-
- $mzs, "intensities" => $inte, "unit" => $unit, - "tolerance" => $tol, "cutoff" => $cutoff, "instrumentTypes" => $inst, - "ionMode" => $ion, "maxNumResults" => 20 -); - - -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->searchSpectrum( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// display obtained data -$ret = $res->return; -echo "\n"; -for ($i = 0 ; $i < $ret->numResults; $i++) { - $info = $ret->results[$i]; - echo "\n"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; -} -echo "
$info->score$info->title$info->formula$info->exactMass$info->id
\n"; -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/MassBankResults.html b/modules/apache/html/MassBank/manuals/api-doc_ja/MassBankResults.html deleted file mode 100644 index 3eff8f79..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/MassBankResults.html +++ /dev/null @@ -1,513 +0,0 @@ - -MassBank Batch Service Results - -

MassBank Batch Service Results

-
-

Request Date : 2010/04/21 17:16:25 JST

-Instrument Type : ALL
-Ion Mode : Positive
-

-

Query 1


-Name: Sample1
-Hit: 50
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Top 20 List
AccessionTitleFormulaMassScoreHit
KO007434Glucosaminate; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO6195.074290.33272
KO008793Zalcitabine; MS/MS; QqTOF; CE:30 V; [M+H]+C9H13N3O3211.095690.32962
KO002907N-Formylmethionine; MS/MS; QqQ; CE:40 V; [M+H]+C6H11NO3S177.045960.31492
KO004274Zalcitabine; MS/MS; QqQ; CE:40 V; [M+H]+C9H13N3O3211.095690.31022
KO008794Zalcitabine; MS/MS; QqTOF; CE:40 V; [M+H]+C9H13N3O3211.095690.29692
KO007003Cytosine arabinoside; MS/MS; QqTOF; CE:50 V; [M+H]+C9H13N3O5243.085520.26862
KO003007Glucosaminate; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO6195.074290.26332
KO0033464-Methyl-5-thiazoleethanol; MS/MS; QqQ; CE:50 V; [M+H]+C6H9NOS143.040480.26302
KO004275Zalcitabine; MS/MS; QqQ; CE:50 V; [M+H]+C9H13N3O3211.095690.23782
KO003006Glucosaminate; MS/MS; QqQ; CE:30 V; [M+H]+C6H13NO6195.074290.23322
KO008795Zalcitabine; MS/MS; QqTOF; CE:50 V; [M+H]+C9H13N3O3211.095690.22422
KO0033454-Methyl-5-thiazoleethanol; MS/MS; QqQ; CE:40 V; [M+H]+C6H9NOS143.040480.20502
KO003656Octopine; MS/MS; QqQ; CE:50 V; [M+H]+C9H18N4O4246.132810.15972
KO008530Specitinomycin; MS/MS; QqTOF; CE:50 V; [M+H]+C14H24N2O7332.158350.15122
KO007433Glucosaminate; MS/MS; QqTOF; CE:20 V; [M+H]+C6H13NO6195.074290.14412
KO003698Pantothenate; MS/MS; QqQ; CE:40 V; [M+H]+C9H17NO5219.110670.14082
KO008260Propylthiouracil; MS/MS; QqTOF; CE:40 V; [M+H]+C7H10N2OS170.051380.12742
KO002798Daminozide; MS/MS; QqQ; CE:30 V; [M+H]+C6H12N2O3160.084790.12512
KO008185Pantothenate; MS/MS; QqTOF; CE:40 V; [M+H]+C9H17NO5219.110670.12082
KO003005Glucosaminate; MS/MS; QqQ; CE:20 V; [M+H]+C6H13NO6195.074290.11662
-
-

Query 2


-Name: Sample2
-Hit: 65
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Top 20 List
AccessionTitleFormulaMassScoreHit
KO002405(Aminomethyl)phosphonate; MS/MS; QqQ; CE:30 V; [M+H]+CH6NO3P111.008530.99182
KO002404(Aminomethyl)phosphonate; MS/MS; QqQ; CE:20 V; [M+H]+CH6NO3P111.008530.67672
KO008101Nornicotine; MS/MS; QqTOF; CE:50 V; [M+H]+C9H12N2148.100050.53082
KO006552Anabasine; MS/MS; QqTOF; CE:40 V; [M+H]+C10H14N2162.11570.39472
KO006553Anabasine; MS/MS; QqTOF; CE:50 V; [M+H]+C10H14N2162.11570.37932
KO006551Anabasine; MS/MS; QqTOF; CE:30 V; [M+H]+C10H14N2162.11570.35742
KO0078014-Methyl-5-thiazoleethanol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H9NOS143.040480.24552
KO0065172-Aminoethylphosphonate; MS/MS; QqTOF; CE:40 V; [M+H]+C2H8NO3P125.024180.18102
KO008256Pseudopelletierine; MS/MS; QqTOF; CE:50 V; [M+H]+C9H15NO153.115360.17812
KO0075765-Hydroxylysine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H14N2O3162.100440.17122
KO007446Galactosamine 1-phosphate; MS/MS; QqTOF; CE:50 V; [M+H]+C6H14NO8P259.04570.16802
KO007425Glucosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.16312
KO008690Thiamine; MS/MS; QqTOF; CE:50 V; [M+H]+C12H17N4OS265.112310.15952
KO0075755-Hydroxylysine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H14N2O3162.100440.14802
KO0065182-Aminoethylphosphonate; MS/MS; QqTOF; CE:50 V; [M+H]+C2H8NO3P125.024180.14802
KO007426Glucosamine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H13NO5179.079370.14172
KO007445Galactosamine 1-phosphate; MS/MS; QqTOF; CE:40 V; [M+H]+C6H14NO8P259.04570.14172
KO007580Histidinol; MS/MS; QqTOF; CE:40 V; [M+H]+C6H11N3O141.090210.13992
KO002997Glucosamine; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO5179.079370.13452
KO007581Histidinol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H11N3O141.090210.12792
-
-

Query 3


-Name: Sample3
-Hit: 61
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Top 20 List
AccessionTitleFormulaMassScoreHit
KO007425Glucosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.31983
KO002997Glucosamine; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO5179.079370.31603
KO007426Glucosamine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H13NO5179.079370.29003
KO002987Galactosamine; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO5179.079370.26523
KO007424Glucosamine; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO5179.079370.26153
KO003018Galactosamine 1-phosphate; MS/MS; QqQ; CE:50 V; [M+H]+C6H14NO8P259.04570.24953
KO002996Glucosamine; MS/MS; QqQ; CE:30 V; [M+H]+C6H13NO5179.079370.23713
KO003142Histidinol; MS/MS; QqQ; CE:50 V; [M+H]+C6H11N3O141.090210.23653
KO007415Galactosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.23373
KO007945Mannosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.23023
KO007446Galactosamine 1-phosphate; MS/MS; QqTOF; CE:50 V; [M+H]+C6H14NO8P259.04570.22323
KO003484Mannosamine; MS/MS; QqQ; CE:30 V; [M+H]+C6H13NO5179.079370.22213
KO007580Histidinol; MS/MS; QqTOF; CE:40 V; [M+H]+C6H11N3O141.090210.21813
KO003141Histidinol; MS/MS; QqQ; CE:40 V; [M+H]+C6H11N3O141.090210.21733
KO007416Galactosamine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H13NO5179.079370.21653
KO0078014-Methyl-5-thiazoleethanol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H9NOS143.040480.21413
KO007414Galactosamine; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO5179.079370.21093
KO007581Histidinol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H11N3O141.090210.21043
KO007579Histidinol; MS/MS; QqTOF; CE:30 V; [M+H]+C6H11N3O141.090210.20533
KO007944Mannosamine; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO5179.079370.19503
-
diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/MassBankResults.txt b/modules/apache/html/MassBank/manuals/api-doc_ja/MassBankResults.txt deleted file mode 100644 index 544d87d0..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/MassBankResults.txt +++ /dev/null @@ -1,101 +0,0 @@ -***** MassBank Batch Service Results ***** - -Request Date: 2010/04/21 17:16:25 JST -# Instrument Type: ALL -# Ion Mode: Positive - - -### Query 1 ### -# Name: Sample1 -# Hit: 50 - -Top 20 List -Accession Title Formula Mass Score Hit - -KO007434 Glucosaminate; MS/MS; QqTOF; CE:30 V; [M+H]+ C6H13NO6 195.07429 0.3327 2 -KO008793 Zalcitabine; MS/MS; QqTOF; CE:30 V; [M+H]+ C9H13N3O3 211.09569 0.3296 2 -KO002907 N-Formylmethionine; MS/MS; QqQ; CE:40 V; [M+H]+ C6H11NO3S 177.04596 0.3149 2 -KO004274 Zalcitabine; MS/MS; QqQ; CE:40 V; [M+H]+ C9H13N3O3 211.09569 0.3102 2 -KO008794 Zalcitabine; MS/MS; QqTOF; CE:40 V; [M+H]+ C9H13N3O3 211.09569 0.2969 2 -KO007003 Cytosine arabinoside; MS/MS; QqTOF; CE:50 V; [M+H]+ C9H13N3O5 243.08552 0.2686 2 -KO003007 Glucosaminate; MS/MS; QqQ; CE:40 V; [M+H]+ C6H13NO6 195.07429 0.2633 2 -KO003346 4-Methyl-5-thiazoleethanol; MS/MS; QqQ; CE:50 V; [M+H]+ C6H9NOS 143.04048 0.2630 2 -KO004275 Zalcitabine; MS/MS; QqQ; CE:50 V; [M+H]+ C9H13N3O3 211.09569 0.2378 2 -KO003006 Glucosaminate; MS/MS; QqQ; CE:30 V; [M+H]+ C6H13NO6 195.07429 0.2332 2 -KO008795 Zalcitabine; MS/MS; QqTOF; CE:50 V; [M+H]+ C9H13N3O3 211.09569 0.2242 2 -KO003345 4-Methyl-5-thiazoleethanol; MS/MS; QqQ; CE:40 V; [M+H]+ C6H9NOS 143.04048 0.2050 2 -KO003656 Octopine; MS/MS; QqQ; CE:50 V; [M+H]+ C9H18N4O4 246.13281 0.1597 2 -KO008530 Specitinomycin; MS/MS; QqTOF; CE:50 V; [M+H]+ C14H24N2O7 332.15835 0.1512 2 -KO007433 Glucosaminate; MS/MS; QqTOF; CE:20 V; [M+H]+ C6H13NO6 195.07429 0.1441 2 -KO003698 Pantothenate; MS/MS; QqQ; CE:40 V; [M+H]+ C9H17NO5 219.11067 0.1408 2 -KO008260 Propylthiouracil; MS/MS; QqTOF; CE:40 V; [M+H]+ C7H10N2OS 170.05138 0.1274 2 -KO002798 Daminozide; MS/MS; QqQ; CE:30 V; [M+H]+ C6H12N2O3 160.08479 0.1251 2 -KO008185 Pantothenate; MS/MS; QqTOF; CE:40 V; [M+H]+ C9H17NO5 219.11067 0.1208 2 -KO003005 Glucosaminate; MS/MS; QqQ; CE:20 V; [M+H]+ C6H13NO6 195.07429 0.1166 2 - - -### Query 2 ### -# Name: Sample2 -# Hit: 65 - -Top 20 List -Accession Title Formula Mass Score Hit - -KO002405 (Aminomethyl)phosphonate; MS/MS; QqQ; CE:30 V; [M+H]+ CH6NO3P 111.00853 0.9918 2 -KO002404 (Aminomethyl)phosphonate; MS/MS; QqQ; CE:20 V; [M+H]+ CH6NO3P 111.00853 0.6767 2 -KO008101 Nornicotine; MS/MS; QqTOF; CE:50 V; [M+H]+ C9H12N2 148.10005 0.5308 2 -KO006552 Anabasine; MS/MS; QqTOF; CE:40 V; [M+H]+ C10H14N2 162.1157 0.3947 2 -KO006553 Anabasine; MS/MS; QqTOF; CE:50 V; [M+H]+ C10H14N2 162.1157 0.3793 2 -KO006551 Anabasine; MS/MS; QqTOF; CE:30 V; [M+H]+ C10H14N2 162.1157 0.3574 2 -KO007801 4-Methyl-5-thiazoleethanol; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H9NOS 143.04048 0.2455 2 -KO006517 2-Aminoethylphosphonate; MS/MS; QqTOF; CE:40 V; [M+H]+ C2H8NO3P 125.02418 0.1810 2 -KO008256 Pseudopelletierine; MS/MS; QqTOF; CE:50 V; [M+H]+ C9H15NO 153.11536 0.1781 2 -KO007576 5-Hydroxylysine; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H14N2O3 162.10044 0.1712 2 -KO007446 Galactosamine 1-phosphate; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H14NO8P 259.0457 0.1680 2 -KO007425 Glucosamine; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H13NO5 179.07937 0.1631 2 -KO008690 Thiamine; MS/MS; QqTOF; CE:50 V; [M+H]+ C12H17N4OS 265.11231 0.1595 2 -KO007575 5-Hydroxylysine; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H14N2O3 162.10044 0.1480 2 -KO006518 2-Aminoethylphosphonate; MS/MS; QqTOF; CE:50 V; [M+H]+ C2H8NO3P 125.02418 0.1480 2 -KO007426 Glucosamine; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H13NO5 179.07937 0.1417 2 -KO007445 Galactosamine 1-phosphate; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H14NO8P 259.0457 0.1417 2 -KO007580 Histidinol; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H11N3O 141.09021 0.1399 2 -KO002997 Glucosamine; MS/MS; QqQ; CE:40 V; [M+H]+ C6H13NO5 179.07937 0.1345 2 -KO007581 Histidinol; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H11N3O 141.09021 0.1279 2 - - -### Query 3 ### -# Name: Sample3 -# Hit: 61 - -Top 20 List -Accession Title Formula Mass Score Hit - -KO007425 Glucosamine; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H13NO5 179.07937 0.3198 3 -KO002997 Glucosamine; MS/MS; QqQ; CE:40 V; [M+H]+ C6H13NO5 179.07937 0.3160 3 -KO007426 Glucosamine; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H13NO5 179.07937 0.2900 3 -KO002987 Galactosamine; MS/MS; QqQ; CE:40 V; [M+H]+ C6H13NO5 179.07937 0.2652 3 -KO007424 Glucosamine; MS/MS; QqTOF; CE:30 V; [M+H]+ C6H13NO5 179.07937 0.2615 3 -KO003018 Galactosamine 1-phosphate; MS/MS; QqQ; CE:50 V; [M+H]+ C6H14NO8P 259.0457 0.2495 3 -KO002996 Glucosamine; MS/MS; QqQ; CE:30 V; [M+H]+ C6H13NO5 179.07937 0.2371 3 -KO003142 Histidinol; MS/MS; QqQ; CE:50 V; [M+H]+ C6H11N3O 141.09021 0.2365 3 -KO007415 Galactosamine; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H13NO5 179.07937 0.2337 3 -KO007945 Mannosamine; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H13NO5 179.07937 0.2302 3 -KO007446 Galactosamine 1-phosphate; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H14NO8P 259.0457 0.2232 3 -KO003484 Mannosamine; MS/MS; QqQ; CE:30 V; [M+H]+ C6H13NO5 179.07937 0.2221 3 -KO007580 Histidinol; MS/MS; QqTOF; CE:40 V; [M+H]+ C6H11N3O 141.09021 0.2181 3 -KO003141 Histidinol; MS/MS; QqQ; CE:40 V; [M+H]+ C6H11N3O 141.09021 0.2173 3 -KO007416 Galactosamine; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H13NO5 179.07937 0.2165 3 -KO007801 4-Methyl-5-thiazoleethanol; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H9NOS 143.04048 0.2141 3 -KO007414 Galactosamine; MS/MS; QqTOF; CE:30 V; [M+H]+ C6H13NO5 179.07937 0.2109 3 -KO007581 Histidinol; MS/MS; QqTOF; CE:50 V; [M+H]+ C6H11N3O 141.09021 0.2104 3 -KO007579 Histidinol; MS/MS; QqTOF; CE:30 V; [M+H]+ C6H11N3O 141.09021 0.2053 3 -KO007944 Mannosamine; MS/MS; QqTOF; CE:30 V; [M+H]+ C6H13NO5 179.07937 0.1950 3 - - -##### END ##### - -********************************************************** -* MassBank.jp - High Resolution Mass Spectral Database * -* URL: http://www.massbank.jp/ * -********************************************************** - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/api_ref.css b/modules/apache/html/MassBank/manuals/api-doc_ja/api_ref.css deleted file mode 100644 index ea39839f..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/api_ref.css +++ /dev/null @@ -1,96 +0,0 @@ -* { font-family: "ƒƒCƒŠƒI", "Meiryo", "Verdana", "Arial", "Trebuchet MS", "MS Gothic", "‚l‚r ƒSƒVƒbƒN", sans-serif; font-style:normal; } - -body, div, p, hr, ul, ol, li, table, th, td, thead, tbody, tfoot, form, pre -{ - font-size:10pt; - font-weight:normal; -} - -h1 { - font-size:14pt; - margin-top:2px; -} - -h1.method { - font-size:14pt; - border-left:7px navy solid; - padding-left:9px; - margin-top:2px; -} - -ul { - margin-top:0px; - margin-left:1.5em; - padding:0; -} - -li { - margin-top:7px; -} - -table.list th { - border: 1px dimgray solid; - background-color:CornFlowerBlue; - padding:5px; - margin:0; - font-weight:bold; - text-align:left; - width:800px -} - -table.list td { - border-left: 1px dimgray solid; - border-right: 1px dimgray solid; - border-bottom: 1px dimgray solid; - font-weight:bold; - text-align:left; - padding:7px; - margin:0; -} - - -a, img { border:0; } -a, a:link, a:visited { color:blue; text-decoration: underline;} -a:hover, a:active{ color:blue; text-decoration: underline;} - -p { - text-indent:1.5em; - line-height:0.7; -} - -hr { - height: 1px; - border: none; - border-top: 1px silver solid; -} - -.src { - width:800px; - border:1px silver solid; - background-color:WhiteSmoke; - padding:5px; -} - -.res1 { - width:400px; - border:1px silver solid; - background-color:MintCream; - padding:8px; -} -.res2 { - width:800px; - border:1px silver solid; - background-color:MintCream; - padding:8px; -} - -.head { - color:dimgray; -} - -.dtype { - color:Maroon; - font-weight:bold; -} - - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/execBatchJob.php b/modules/apache/html/MassBank/manuals/api-doc_ja/execBatchJob.php deleted file mode 100644 index af01e67b..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/execBatchJob.php +++ /dev/null @@ -1,450 +0,0 @@ - - - -execBatchJob メソッド - - - -MassBank WEB-API リファレンス -
-

execBatchJob メソッド

-ãƒãƒƒãƒå‡¦ç†ã«ã¦ä¸€æ‹¬æ¤œç´¢ã‚’実行ã—ã¾ã™ã€‚
-
    -
  • ジョブã®å®Ÿè¡ŒçŠ¶æ³ã¯ã€ getJobStatus ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã‚Šå–å¾—ã§ãã¾ã™ã€‚
  • -
  • 検索çµæžœã¯ã€ getJobResult ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã‚Šå–å¾—ã§ãã¾ã™ã€‚getJobResult ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚¸ãƒ§ãƒ–実行状æ³ã‚’確èªã—ãŸä¸Šã§å‘¼ã³å‡ºã—ã¦ãã ã•ã„。
    ãªãŠã€æ¤œç´¢çµæžœç­‰ã®æƒ…å ±ã¯ã‚µãƒ¼ãƒå´ã«æ•°æ—¥é–“ä¿æŒã•ã‚Œã¾ã™ã€‚ -
  • -
  • メールアドレスを指定ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€æ¤œç´¢çµæžœã‚’メールã§å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚メールã«ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ã¨HTMLå½¢å¼ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒ
    添付ã•ã‚Œã¾ã™ã€‚クエリã®ã‚¹ãƒšã‚¯ãƒˆãƒ«ãŒå¤§é‡ã«ã‚ã‚‹å ´åˆã¯ã€æ·»ä»˜ãƒ•ã‚¡ã‚¤ãƒ«ã®ã‚µã‚¤ã‚ºãŒå¤§ãããªã‚Šã¾ã™ã®ã§ã”注æ„ãã ã•ã„。
    - 添付ファイルサイズã¯ã€1000スペクトルをクエリã«ã—ãŸå ´åˆã«ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆå½¢å¼ãŒ1.5MBã€HTMLå½¢å¼ãŒ5MB程度ã«ãªã‚Šã¾ã™ã€‚ -
  • -
- -
-パラメータ
- - - - - - - - - - - - - - - - - - - - - -
type[åž‹]string -実行ã™ã‚‹ã‚¸ãƒ§ãƒ–種別ã®ç•ªå·
-1: searchSpectrum -
mailAddress[åž‹]string検索çµæžœã‚’å—ã‘å–るメールアドレス(メールä¸è¦ã®å ´åˆã¯ç©ºæ–‡å­—ã«ã—ã¦ãã ã•ã„)
queryStrings[åž‹]string é…列クエリã®ã‚¹ãƒšã‚¯ãƒˆãƒ«
-  é…列ã®1ã¤ã®è¦ç´ ã«1スペクトル分ã®æƒ…報を格ç´ã—ã¾ã™ã€‚m/z ã¨intensity ã®ãƒšã‚¢ã®ç¹‹ãŒã‚Šã‚’1è¡Œã§è¨˜è¿°ã—ã¦ãã ã•ã„。
-
-  m/z(茶色) ã¨intensity(紫色) ã®é–“ã«ã€Œ,ã€ã‚«ãƒ³ãƒžã‚’入れãŸãƒšã‚¢ã‚’「;ã€ã‚»ãƒŸã‚³ãƒ­ãƒ³åŒºåˆ‡ã‚Šã§è¨˜è¿°ã—ã¦ãã ã•ã„。 -
-  (例) 58.500,39604.0; 73.200,14851.5;
-
-  Name ã‚¿ã‚°(緑色)ã¯æ¤œç´¢çµæžœã®è¦‹å‡ºã—ã«ãªã‚Šã¾ã™ã®ã§ã€ä»˜ä¸Žã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ -
-  (例) Name: Compound1; 58.500,39604.0; 73.200,14851.5 -
-   â€» Name ã‚¿ã‚°ã‚’付ã‘ãªã„å ´åˆã¯ã€ã‚·ã‚¹ãƒ†ãƒ å´ã§è‡ªå‹•ä»˜ä¸Žã—ã¾ã™ - -
instrumentTypes[åž‹]string é…列 -分æžæ©Ÿå™¨ç¨®åˆ¥ã‚’指定ã™ã‚‹ï¼ˆè¤‡æ•°æŒ‡å®šå¯ï¼‰ã€‚"all"を指定ã—ãŸå ´åˆã¯ã€ã™ã¹ã¦ã®ç¨®åˆ¥ãŒæ¤œç´¢å¯¾è±¡ã«ãªã‚Šã¾ã™ã€‚
-getInstrumentTypes メソッドã«ã¦å–å¾—ã—ãŸå€¤ä»¥å¤–ã¯æŒ‡å®šã—ãªã„ã§ãã ã•ã„。
-
ionMode[型]string -イオン化モード
-"Positive", "Negative", "Both"ã®ã„ãšã‚Œã‹(大文字・å°æ–‡å­—区別ãªã—)を指定ã—ã¾ã™ã€‚
-
-

-レスãƒãƒ³ã‚¹
-ジョブIDã‚’ string åž‹ã§è¿”ã—ã¾ã™ã€‚
-

-例外
-エラーメッセージ
-"Invalid parameter : xxxxx" : パラメータãŒä¸æ­£ãªå ´åˆ -

- -
-
-■PHPソースコード
-
-
-// パラメータセット
-$mail = "hogehoge@massbank.jp";
-$query = array(
-	"Name:Sample1; 59.300,653466.0; 112.300,19802.0;",
-	"Name:Sample2; 30.000,34653.5; 80.100,430693.5;",
-	"Name:Sample3; 80.100,430693.5; 55.900,89109.0; 60.100,391089.5;"
-);
-$inst = array("all");
-$ion = "Positive";
-$params = array(
-	"type" => "1", "mailAddress" => $mail,
-	"queryStrings" => $query,
- 	"instrumentTypes" => $inst, "ionMode" => $ion
-);
-
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-// ãƒãƒƒãƒå‡¦ç†å®Ÿè¡Œ
-try {
-	$res1 = $soap->execBatchJob( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-$job_id = $res1->return;
-
-for ($lp = 0 ; $lp < 60; $lp++) {
-	sleep(60);
-
-	// ジョブステータスå–å¾—
-	try {
-		$res2 = $soap->getJobStatus( array("jobId" => $job_id) );
-	}
-	catch (SoapFault $e) {
-		echo $e->getMessage();
-		return;
-	}
-
-	// ステータスãŒ"処ç†å®Œäº†"ã§ã‚ã‚‹ã‹ï¼Ÿ
-	$status_info = $res2->return;
-	if ( $status_info->status == "Completed" ) {
-		break;
-	}
-}
-
-// çµæžœå–å¾—
-try {
-	$res3 = $soap->getJobResult( array("jobId" => $job_id) );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// çµæžœè¡¨ç¤º
-$result_set_array = $res3->return;
-foreach ($result_set_array as $result_set) {
-	echo "<table border=\"1\" width=\"800\">\n";
-	echo "<tr>\n";
-	echo "<th colspan=\"5\" bgcolor=\"tan\">Name:" . $result_set->queryName . "</th>\n";
-	echo "</tr>\n";
-	$results = $result_set->results;
-	if ( $result_set->numResults > 0 ) {
-		for ($i = 0; $i < $result_set->numResults; $i++) {
-			echo "<tr>\n";
-			echo "<td>" . $results[$i]->id . "</td>";
-			echo "<td>" . $results[$i]->title . "</td>";
-			echo "<td>" . $results[$i]->formula . "</td>";
-			echo "<td>" . $results[$i]->exactMass ."</td>";
-			echo "<td>" . $results[$i]->score ."</td>\n";
-			echo "</tr>\n";
-		}
-		echo "</table>\n";
-		echo "<br><br>\n";
-	}
-}
-
-
-
-
-
-■実行çµæžœ
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name:Sample1
KO007434Glucosaminate; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO6195.074290.332743216985
KO008793Zalcitabine; MS/MS; QqTOF; CE:30 V; [M+H]+C9H13N3O3211.095690.329629198196
KO002907N-Formylmethionine; MS/MS; QqQ; CE:40 V; [M+H]+C6H11NO3S177.045960.314935858280
KO004274Zalcitabine; MS/MS; QqQ; CE:40 V; [M+H]+C9H13N3O3211.095690.310268851943
KO008794Zalcitabine; MS/MS; QqTOF; CE:40 V; [M+H]+C9H13N3O3211.095690.296979042792
KO007003Cytosine arabinoside; MS/MS; QqTOF; CE:50 V; [M+H]+C9H13N3O5243.085520.268674599679
KO003007Glucosaminate; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO6195.074290.263307583821
KO0033464-Methyl-5-thiazoleethanol; MS/MS; QqQ; CE:50 V; [M+H]+C6H9NOS143.040480.263085430179
KO004275Zalcitabine; MS/MS; QqQ; CE:50 V; [M+H]+C9H13N3O3211.095690.237873574930
KO003006Glucosaminate; MS/MS; QqQ; CE:30 V; [M+H]+C6H13NO6195.074290.233280373531
KO008795Zalcitabine; MS/MS; QqTOF; CE:50 V; [M+H]+C9H13N3O3211.095690.224262623599
KO0033454-Methyl-5-thiazoleethanol; MS/MS; QqQ; CE:40 V; [M+H]+C6H9NOS143.040480.205072254437
KO003656Octopine; MS/MS; QqQ; CE:50 V; [M+H]+C9H18N4O4246.132810.159741861817
KO008530Specitinomycin; MS/MS; QqTOF; CE:50 V; [M+H]+C14H24N2O7332.158350.151279789599
KO007433Glucosaminate; MS/MS; QqTOF; CE:20 V; [M+H]+C6H13NO6195.074290.144159570525
KO003698Pantothenate; MS/MS; QqQ; CE:40 V; [M+H]+C9H17NO5219.110670.140839650663
KO008260Propylthiouracil; MS/MS; QqTOF; CE:40 V; [M+H]+C7H10N2OS170.051380.127438617559
KO002798Daminozide; MS/MS; QqQ; CE:30 V; [M+H]+C6H12N2O3160.084790.125149708001
KO008185Pantothenate; MS/MS; QqTOF; CE:40 V; [M+H]+C9H17NO5219.110670.120844661943
KO003005Glucosaminate; MS/MS; QqQ; CE:20 V; [M+H]+C6H13NO6195.074290.116666006930
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name:Sample2
KO002405(Aminomethyl)phosphonate; MS/MS; QqQ; CE:30 V; [M+H]+CH6NO3P111.008530.991818407760
KO002404(Aminomethyl)phosphonate; MS/MS; QqQ; CE:20 V; [M+H]+CH6NO3P111.008530.676787141247
KO008101Nornicotine; MS/MS; QqTOF; CE:50 V; [M+H]+C9H12N2148.100050.530833881721
KO006552Anabasine; MS/MS; QqTOF; CE:40 V; [M+H]+C10H14N2162.11570.394746543614
KO006553Anabasine; MS/MS; QqTOF; CE:50 V; [M+H]+C10H14N2162.11570.379324536093
KO006551Anabasine; MS/MS; QqTOF; CE:30 V; [M+H]+C10H14N2162.11570.357458431230
KO0078014-Methyl-5-thiazoleethanol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H9NOS143.040480.245597772284
KO0065172-Aminoethylphosphonate; MS/MS; QqTOF; CE:40 V; [M+H]+C2H8NO3P125.024180.181088725776
KO008256Pseudopelletierine; MS/MS; QqTOF; CE:50 V; [M+H]+C9H15NO153.115360.178134921798
KO0075765-Hydroxylysine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H14N2O3162.100440.171289255584
KO007446Galactosamine 1-phosphate; MS/MS; QqTOF; CE:50 V; [M+H]+C6H14NO8P259.04570.168056563156
KO007425Glucosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.163103503467
KO008690Thiamine; MS/MS; QqTOF; CE:50 V; [M+H]+C12H17N4OS265.112310.159514608029
KO0075755-Hydroxylysine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H14N2O3162.100440.148091014407
KO0065182-Aminoethylphosphonate; MS/MS; QqTOF; CE:50 V; [M+H]+C2H8NO3P125.024180.148044559626
KO007426Glucosamine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H13NO5179.079370.141770073616
KO007445Galactosamine 1-phosphate; MS/MS; QqTOF; CE:40 V; [M+H]+C6H14NO8P259.04570.141769257245
KO007580Histidinol; MS/MS; QqTOF; CE:40 V; [M+H]+C6H11N3O141.090210.139963012225
KO002997Glucosamine; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO5179.079370.134523836788
KO007581Histidinol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H11N3O141.090210.127913647792
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name:Sample3
KO007425Glucosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.319847567416
KO002997Glucosamine; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO5179.079370.316066578573
KO007426Glucosamine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H13NO5179.079370.290066849033
KO002987Galactosamine; MS/MS; QqQ; CE:40 V; [M+H]+C6H13NO5179.079370.265270054120
KO007424Glucosamine; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO5179.079370.261544225901
KO003018Galactosamine 1-phosphate; MS/MS; QqQ; CE:50 V; [M+H]+C6H14NO8P259.04570.249522588565
KO002996Glucosamine; MS/MS; QqQ; CE:30 V; [M+H]+C6H13NO5179.079370.237198964530
KO003142Histidinol; MS/MS; QqQ; CE:50 V; [M+H]+C6H11N3O141.090210.236523446883
KO007415Galactosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.233713562874
KO007945Mannosamine; MS/MS; QqTOF; CE:40 V; [M+H]+C6H13NO5179.079370.230281898003
KO007446Galactosamine 1-phosphate; MS/MS; QqTOF; CE:50 V; [M+H]+C6H14NO8P259.04570.223288641815
KO003484Mannosamine; MS/MS; QqQ; CE:30 V; [M+H]+C6H13NO5179.079370.222155169076
KO007580Histidinol; MS/MS; QqTOF; CE:40 V; [M+H]+C6H11N3O141.090210.218122614162
KO003141Histidinol; MS/MS; QqQ; CE:40 V; [M+H]+C6H11N3O141.090210.217331552642
KO007416Galactosamine; MS/MS; QqTOF; CE:50 V; [M+H]+C6H13NO5179.079370.216573880670
KO0078014-Methyl-5-thiazoleethanol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H9NOS143.040480.214173316494
KO007414Galactosamine; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO5179.079370.210917331400
KO007581Histidinol; MS/MS; QqTOF; CE:50 V; [M+H]+C6H11N3O141.090210.210430186017
KO007579Histidinol; MS/MS; QqTOF; CE:30 V; [M+H]+C6H11N3O141.090210.205380343969
KO007944Mannosamine; MS/MS; QqTOF; CE:30 V; [M+H]+C6H13NO5179.079370.195042667845
- "1", "mailAddress" => $mail, - "queryStrings" => $query, - "instrumentTypes" => $inst, "ionMode" => $ion -); - -set_time_limit(0); -$soap = new SoapClient('http://localhost/api/services/MassBankAPI?wsdl'); -try { - $res1 = $soap->execBatchJob( $params ); - $job_id = $res1->return; - - for ($lp = 0 ; $lp < 60; $lp++) { - sleep(60); - $res2 = $soap->getJobStatus( array("jobId" => $job_id) ); - $status_info = $res2->return; - - if ( $status_info->status == "Completed" ) { - break; - } - } - - $res3 = $soap->getJobResult( array("jobId" => $job_id) ); - $result_set_array = $res3->return; - foreach ($result_set_array as $result_set) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $results = $result_set->results; - if ( $result_set->numResults > 0 ) { - for ($i = 0; $i < $result_set->numResults; $i++) { - echo "\n"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - } - } - echo "
Name:" . $result_set->queryName . "
" . $results[$i]->id . "" . $results[$i]->title . "" . $results[$i]->formula . "" . $results[$i]->exactMass ."" . $results[$i]->score ."
\n"; - echo "

\n"; - } -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} -*/ -?> - - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/getInst.php b/modules/apache/html/MassBank/manuals/api-doc_ja/getInst.php deleted file mode 100644 index 9c674413..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/getInst.php +++ /dev/null @@ -1,51 +0,0 @@ - - - -getInstrumentTypes メソッド - - - -MassBank WEB-API リファレンス -
-

getInstrumentTypes メソッド

-MassBankã«ç™»éŒ²ã•ã‚Œã¦ã„るデータã®åˆ†æžæ©Ÿå™¨ç¨®åˆ¥ã™ã¹ã¦ã‚’å–å¾—ã—ã¾ã™ã€‚
-
-パラメータ
-ãªã—
-
-レスãƒãƒ³ã‚¹
-分æžæ©Ÿå™¨ç¨®åˆ¥ã‚’ string åž‹ã®é…列ã§è¿”ã—ã¾ã™ã€‚
-
-
-
-■PHPソースコード
-
-
-// パラメータセット
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-$res = $soap->getInstrumentTypes();
-
-// å–得内容表示
-for ($i = 0 ; $i < count($res->return); $i++) {
-	echo $res->return[$i] . "<br>";
-}
-
-
-
-
-â– å–得内容(実際ã«å–å¾—ã—ã¦ã„ã¾ã™)
-
-getInstrumentTypes(); - -// å–得内容表示 -for ($i = 0 ; $i < count($res->return); $i++) { - echo $res->return[$i] . "
\n"; -} -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/getJobResult.php b/modules/apache/html/MassBank/manuals/api-doc_ja/getJobResult.php deleted file mode 100644 index 9ed9b3c7..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/getJobResult.php +++ /dev/null @@ -1,49 +0,0 @@ - - - -getJobResult メソッド - - - -MassBank WEB-API リファレンス -
-

getJobResult メソッド

-指定ã—ãŸã‚¸ãƒ§ãƒ–IDã®çµæžœã‚’å–å¾—ã—ã¾ã™ã€‚
-
-パラメータ
- - - - -
jobId[型]stringジョブID
-
-

-レスãƒãƒ³ã‚¹
-検索çµæžœã‚’ ResultSet åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã®é…列ã§è¿”ã—ã¾ã™ã€‚
- - -
-  - queryName : ã‚¯ã‚¨ãƒªå [åž‹]string
-  - numResults : æ¤œç´¢çµæžœæ•° [åž‹]int *1
-  - results : ãƒ’ットã—ãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã®æƒ…å ±  [åž‹]Result åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã®é…列
-        ï½œ
-        â”œ id : MassBank ID [åž‹]string
-        ï½œ title : ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚¿ã‚¤ãƒˆãƒ« [åž‹]string
-        ï½œ formula : åˆ†å­å¼ [åž‹]string
-        ï½œ exactMass : ç²¾å¯†è³ªé‡ [åž‹]string
-        â”” score : ã‚¹ã‚³ã‚¢ [åž‹]string
-
-  *1: ä¸æ­£ãªå½¢å¼ã§ã‚ã£ãŸã‚¯ã‚¨ãƒªã«ã¤ã„ã¦ã¯ã€numResults 㯠"-1" ã«ã‚»ãƒƒãƒˆã•ã‚Œã¾ã™ã€‚ -
-

-例外
-エラーメッセージ
-"Job not found" : 指定ã•ã‚ŒãŸIDã®ã‚¸ãƒ§ãƒ–ãŒå­˜åœ¨ã—ãªã„å ´åˆ -

- -
-
-■PHPソースコード
-execBatchJob ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/getJobStatus.php b/modules/apache/html/MassBank/manuals/api-doc_ja/getJobStatus.php deleted file mode 100644 index 1298023b..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/getJobStatus.php +++ /dev/null @@ -1,45 +0,0 @@ - - - -getJobStatus メソッド - - - -MassBank WEB-API リファレンス -
-

getJobStatus メソッド

-指定ã—ãŸã‚¸ãƒ§ãƒ–IDã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’å–å¾—ã—ã¾ã™ã€‚
-
-パラメータ
- - - - -
jobId[型]stringジョブID
-
-

-レスãƒãƒ³ã‚¹
-ステータスを JobStatus åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã§è¿”ã—ã¾ã™ã€‚
- - -
-  - status : ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹æ–‡å­—列 [åž‹]string
-    ["Waiting":実行待㡠, "Running":ジョブ実行中 , "Completed":処ç†å®Œäº†]
-
-  - statusCode : ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰[åž‹]string
-    ["0":実行待㡠, "1":ジョブ実行中 , "2":処ç†å®Œäº†]
-
-  - requestDate : ãƒªã‚¯ã‚¨ã‚¹ãƒˆå—付ã‘日時 [åž‹]string
-
-

-例外
-エラーメッセージ
-"Job not found" : 指定ã•ã‚ŒãŸIDã®ã‚¸ãƒ§ãƒ–ãŒå­˜åœ¨ã—ãªã„å ´åˆ -

- -
-
-■PHPソースコード
-execBatchJob ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/getPeak.php b/modules/apache/html/MassBank/manuals/api-doc_ja/getPeak.php deleted file mode 100644 index 9f5b6664..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/getPeak.php +++ /dev/null @@ -1,106 +0,0 @@ - - - -getPeak メソッド - - - -MassBank WEB-API リファレンス -
-

getPeak メソッド

-ピークデータをå–å¾—ã—ã¾ã™ã€‚
-
-パラメータ
- - - - - - -
ids[åž‹]string é…列å–å¾—ã™ã‚‹ãƒ”ークデータã®MassBank IDを指定ã—ã¾ã™
-

-レスãƒãƒ³ã‚¹
-ピークデータを Peak åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã®é…列ã§è¿”ã—ã¾ã™ã€‚
- - -
-  - id : å–å¾—ã—ãŸãƒ”ークデータã®MassBank ID [åž‹]string
-  - numPeaks : ãƒ”ーク数 [åž‹]int
-  - mzs : m/z [åž‹]string é…列
-  - intensities : intensity [åž‹]string é…列
-
-
-例外
-エラーメッセージ
-"MassBank Record is not found." : è©²å½“ã™ã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒï¼‘ã¤ã‚‚ãªã„(存在ã—ãªã„MassBank IDを指定ã—ã¦ã„ã‚‹ï¼‰å ´åˆ -

- -
-
-■PHPソースコード
-
-
-// パラメータセット
-$ids = array("PR020001", "PR020002", "PR020003", "FU000001" );
-$params = array("ids" => $ids );
-
-// メソッド呼ã³å‡ºã—
-$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-try {
-	$res = $soap->getPeak( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// å–得内容表示
-$ret = $res->return;
-for ($i = 0 ; $i < count($ret); $i++) {
-	echo "[" . $ret[$i]->id . "]<br>\n";
-	echo "NUM_PEAK:" . $ret[$i]->numPeaks . "<br>\n";
-	for ($j = 0 ; $j < count($ret[$i]->mzs); $j++) {
-		$mz = $ret[$i]->mzs[$j];
-		$inte = $ret[$i]->intensities[$j];
-		echo "mz:$mz, inte:$inte<br>\n";
-	}
-	echo "<br><br>\n";
-}
-
-
-
-
-â– å–得内容(実際ã«å–å¾—ã—ã¦ã„ã¾ã™)
-
- $ids ); - -// メソッド呼ã³å‡ºã— -//$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -$soap = new SoapClient('http://localhost/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->getPeak( $params ); -} -catch(SoapFault $e) { - echo $e->getMessage(); - return; -} - -// å–得内容表示 -$ret = $res->return; -for ($i = 0 ; $i < count($ret); $i++) { - echo "[" . $ret[$i]->id . "]
\n"; - echo "NUM_PEAK:" . $ret[$i]->numPeaks . "
\n"; - for ($j = 0 ; $j < count($ret[$i]->mzs); $j++) { - $mz = $ret[$i]->mzs[$j]; - $inte = $ret[$i]->intensities[$j]; - echo "mz:$mz, inte:$inte
\n"; - } - echo "

\n"; -} -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/getRecordInfo.php b/modules/apache/html/MassBank/manuals/api-doc_ja/getRecordInfo.php deleted file mode 100644 index d1f31d06..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/getRecordInfo.php +++ /dev/null @@ -1,94 +0,0 @@ - - - -getRecordInfo メソッド - - - -MassBank WEB-API リファレンス -
-

getRecordInfo メソッド

-MassBankレコード情報(ピークデータã€åˆ†æžæ¡ä»¶ç­‰ã™ã¹ã¦å«ã‚€ï¼‰ã‚’å–å¾—ã—ã¾ã™ã€‚
-
-パラメータ
- - - - - - -
ids[åž‹]string é…列å–å¾—ã™ã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ã®MassBank IDを指定ã—ã¾ã™ã€‚
-

-レスãƒãƒ³ã‚¹
-MassBankレコード情報を RecordInfo åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã®é…列ã§è¿”ã—ã¾ã™ã€‚
- - -
-  - id : å–å¾—ã—ãŸãƒ¬ã‚³ãƒ¼ãƒ‰æƒ…å ±ã®MassBank ID [åž‹]string
-  - info : ãƒ¬ã‚³ãƒ¼ãƒ‰æƒ…å ± [åž‹]string
-
-
-例外
-エラーメッセージ
-"MassBank Record is not found." : è©²å½“ã™ã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒï¼‘ã¤ã‚‚ãªã„(存在ã—ãªã„MassBank IDを指定ã—ã¦ã„ã‚‹ï¼‰å ´åˆ -

- -
-
-■PHPソースコード
-
-
-// パラメータセット
-$ids = array("KOX00001", "KOX00002", "TY000040", "FU000001" );
-$params = array("ids" => $ids );
-
-// メソッド呼ã³å‡ºã—
-//$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
-$soap = new SoapClient('http://localhost/api/services/MassBankAPI?wsdl');
-try {
-	$res = $soap->getRecordInfo( $params );
-}
-catch (SoapFault $e) {
-	echo $e->getMessage();
-	return;
-}
-
-// å–得内容表示
-$ret = $res->return;
-for ($i = 0 ; $i < count($ret); $i++) {
-	$info = str_replace("\n", "<br>", $ret[$i]->info );
-	echo "[" . $ret[$i]->id . "]<br>\n";
-	echo $info . "<br><br>\n";
-}
-
-
-
-
-â– å–得内容(実際ã«å–å¾—ã—ã¦ã„ã¾ã™)
-
- $ids ); - -// メソッド呼ã³å‡ºã— -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->getRecordInfo( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// å–得内容表示 -$ret = $res->return; -for ($i = 0 ; $i < count($ret); $i++) { - $info = str_replace("\n", "
", $ret[$i]->info ); - echo "[" . $ret[$i]->id . "]
\n"; - echo $info . "

\n"; -} -?> -
- - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/reference.html b/modules/apache/html/MassBank/manuals/api-doc_ja/reference.html deleted file mode 100644 index 753c2400..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/reference.html +++ /dev/null @@ -1,99 +0,0 @@ - - - -MassBank WEB-API リファレンス - - - -

MassBank WEB-API リファレンス   English

-
-
  • スキーマ(WSDL)
  • -http://www.massbank.jp/api/services/MassBankAPI?wsdl -

    -
    - - - - - - - - - - - - - - -
    å–得系メソッド
    - getInstrumentTypes メソッド -

    MassBankã«ç™»éŒ²ã•ã‚Œã¦ã„るデータã®åˆ†æžæ©Ÿå™¨ç¨®åˆ¥ã™ã¹ã¦ã‚’å–å¾—ã—ã¾ã™ã€‚

    -
    - getRecordInfo メソッド -

    MassBankレコード情報(ピークデータã€åˆ†æžæ¡ä»¶ç­‰ã™ã¹ã¦å«ã‚€ï¼‰ã‚’å–å¾—ã—ã¾ã™ã€‚

    -
    - getPeak メソッド -

    ピークデータをå–å¾—ã—ã¾ã™ã€‚

    -
    -
    -
    - - - - - - - - - - - - - - - - - -
    検索系メソッド
    - searchSpectrum メソッド -

    類似スペクトルを検索ã—ã¾ã™ã€‚

    -
    - searchPeak メソッド -

    指定ã—ãŸm/zã®ãƒ”ークãŒå‡ºç¾ã™ã‚‹ã‚¹ãƒšã‚¯ãƒˆãƒ«ã‚’検索ã—ã¾ã™ã€‚

    -
    - searchPeakDiff メソッド -

    指定ã—ãŸm/zå·®ã®ãƒ”ークãŒå‡ºç¾ã™ã‚‹ã‚¹ãƒšã‚¯ãƒˆãƒ«ã‚’検索ã—ã¾ã™ã€‚

    -
    - searchSubstructure メソッド    ãƒ»ãƒ»ãƒ» å¾Œæ—¥å…¬é–‹äºˆå®š -

    化学構造ã«ã‚ˆã‚‹åŒ–åˆç‰©æ¤œç´¢ã‚’è¡Œã„ã¾ã™ã€‚

    -
    -
    -
    - - - - - - - - - - - - - - -
    ãƒãƒƒãƒå‡¦ç†é–¢é€£ãƒ¡ã‚½ãƒƒãƒ‰  NEW
    - execBatchJob メソッド -

    ãƒãƒƒãƒå‡¦ç†ã«ä¸€æ‹¬æ¤œç´¢ã‚’実行ã—ã¾ã™ã€‚

    -
    - getJobStatus メソッド -

    指定ã—ãŸã‚¸ãƒ§ãƒ–IDã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’å–å¾—ã—ã¾ã™ã€‚

    -
    - getJobResult メソッド -

    指定ã—ãŸã‚¸ãƒ§ãƒ–IDã®çµæžœã‚’å–å¾—ã—ã¾ã™ã€‚

    -
    - - -
    -
    diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/searchPeak.php b/modules/apache/html/MassBank/manuals/api-doc_ja/searchPeak.php deleted file mode 100644 index df2e0c03..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/searchPeak.php +++ /dev/null @@ -1,147 +0,0 @@ - - - -searchPeak メソッド - - - -MassBank WEB-API リファレンス -
    -

    searchPeak メソッド

    -指定ã—ãŸm/zã®ãƒ”ークãŒå‡ºç¾ã™ã‚‹ã‚¹ãƒšã‚¯ãƒˆãƒ«ã‚’検索ã—ã¾ã™ã€‚
    -
    -パラメータ
    - - - - - - - - - - - - - - - - - - - - - - - -
    mzs[åž‹]string é…列ピーク㮠m/z値
    relativeIntensity[型]stringピーク㮠intensity値
    tolerance[åž‹]stringピーク m/zã®è¨±å®¹ç¯„囲
    instrumentTypes[åž‹]string é…列 -分æžæ©Ÿå™¨ç¨®åˆ¥ã‚’指定ã™ã‚‹ï¼ˆè¤‡æ•°æŒ‡å®šå¯ï¼‰ã€‚"all"を指定ã—ãŸå ´åˆã¯ã€ã™ã¹ã¦ã®ç¨®åˆ¥ãŒæ¤œç´¢å¯¾è±¡ã«ãªã‚Šã¾ã™ã€‚
    -getInstrumentTypes メソッドã«ã¦å–å¾—ã—ãŸå€¤ä»¥å¤–ã¯æŒ‡å®šã—ãªã„ã§ãã ã•ã„。
    -
    ionMode[型]string -イオン化モード
    -"Positive", "Negative", "Both" ã®ã„ãšã‚Œã‹(大文字・å°æ–‡å­—区別ãªã—)を指定ã—ã¾ã™ã€‚
    -
    maxNumResults[åž‹]int検索çµæžœæ•°ã®ä¸Šé™ã€‚"0" を指定ã—ãŸå ´åˆã¯ã™ã¹ã¦ã‚’å–å¾—ã—ã¾ã™ã€‚
    -

    -レスãƒãƒ³ã‚¹
    -検索çµæžœã‚’ SearchResult åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã§è¿”ã—ã¾ã™ã€‚
    - - -
    -  - numResults : æ¤œç´¢çµæžœæ•° [åž‹]int
    -  - results : ãƒ’ットã—ãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã®æƒ…å ±  [åž‹]Result åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã®é…列
    -        ï½œ
    -        â”œ id : MassBank ID [åž‹]string
    -        ï½œ title : ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚¿ã‚¤ãƒˆãƒ« [åž‹]string
    -        ï½œ formula : åˆ†å­å¼ [åž‹]string
    -        ï½œ exactMass : ç²¾å¯†è³ªé‡ [åž‹]string
    -        â”” score : ã‚¹ã‚³ã‚¢ [åž‹]string ãƒ»ãƒ»ãƒ» searchPeakã®å ´åˆã¯ã€ã‚¹ã‚³ã‚¢ãƒªãƒ³ã‚°ã¯è¡Œã„ã¾ã›ã‚“ã®ã§"0"ã«ã‚»ãƒƒãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ -
    -
    -例外
    -エラーメッセージ
    -"Invalid parameter : xxxxx" : ãƒ‘ラメータãŒä¸æ­£ãªå ´åˆ -

    - -
    -
    -■PHPソースコード
    -
    -
    -// パラメータセット
    -$mzs = array('80', '85');
    -$inte = "200";
    -$tol = "0.3";
    -$inst = array("all");
    -$ion = "Both";
    -$params = array(
    -	"mzs" => $mzs, "relativeIntensity" => $inte,   "tolerance" => $tol,
    -	"instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0
    -);
    -
    -// メソッド呼ã³å‡ºã—
    -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
    -try {
    -	$res = $soap->searchPeak( $params );
    -}
    -catch (SoapFault $e) {
    -	echo $e->getMessage();
    -	return;
    -}
    -
    -// 検索çµæžœè¡¨ç¤º
    -$ret = $res->return;
    -echo "<table>\n";
    -for ($i = 0 ; $i < $ret->numResults; $i++) {
    -	$info = $ret->results[$i];
    -	echo "<tr>\n";
    -	echo "<td>$info->title</td>";
    -	echo "<td>$info->formula</td>";
    -	echo "<td>$info->exactMass</td>";
    -	echo "<td>$info->id</td>\n";
    -	echo "</tr>\n";
    -}
    -echo "</table>\n";
    -
    -
    -
    -
    -■検索çµæžœ(実際ã®çµæžœã§ã™)
    -
    - $mzs, "relativeIntensity" => $inte, "tolerance" => $tol, - "instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0 -); - -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -//$soap = new SoapClient('http://localhost/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->searchPeak( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// 検索çµæžœè¡¨ç¤º -$ret = $res->return; -echo "\n"; -for ($i = 0 ; $i < $ret->numResults; $i++) { - $info = $ret->results[$i]; - echo "\n"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; -} -echo "
    $info->title$info->formula$info->exactMass$info->id
    \n"; -?> -
    - - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/searchPeakDiff.php b/modules/apache/html/MassBank/manuals/api-doc_ja/searchPeakDiff.php deleted file mode 100644 index d1dfc9f2..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/searchPeakDiff.php +++ /dev/null @@ -1,147 +0,0 @@ - - - -searchPeakDiff メソッド - - - -MassBank WEB-API リファレンス -
    -

    searchPeakDiff メソッド

    -指定ã—ãŸm/zå·®ã®ãƒ”ークãŒå‡ºç¾ã™ã‚‹ã‚¹ãƒšã‚¯ãƒˆãƒ«ã‚’検索ã—ã¾ã™ã€‚
    -
    -パラメータ
    - - - - - - - - - - - - - - - - - - - - - - - -
    mzs[åž‹]string é…列ピーク m/z値ã®å·®
    relativeIntensity[型]stringピーク㮠intensity値
    tolerance[åž‹]stringピーク m/zå·®ã®è¨±å®¹ç¯„囲
    instrumentTypes[åž‹]string é…列 -分æžæ©Ÿå™¨ç¨®åˆ¥ã‚’指定ã™ã‚‹ï¼ˆè¤‡æ•°æŒ‡å®šå¯ï¼‰ã€‚"all"を指定ã—ãŸå ´åˆã¯ã€ã™ã¹ã¦ã®ç¨®åˆ¥ãŒæ¤œç´¢å¯¾è±¡ã«ãªã‚Šã¾ã™ã€‚
    -getInstrumentTypes メソッドã«ã¦å–å¾—ã—ãŸå€¤ä»¥å¤–ã¯æŒ‡å®šã—ãªã„ã§ãã ã•ã„。
    -
    ionMode[型]string -イオン化モード
    -"Positive", "Negative", "Both" ã®ã„ãšã‚Œã‹(大文字・å°æ–‡å­—区別ãªã—)を指定ã—ã¾ã™ã€‚
    -
    maxNumResults[åž‹]int検索çµæžœæ•°ã®ä¸Šé™ã€‚"0" を指定ã—ãŸå ´åˆã¯ã™ã¹ã¦ã‚’å–å¾—ã™ã‚‹ã€‚
    -

    -レスãƒãƒ³ã‚¹
    -検索çµæžœã‚’ SearchResult åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã§è¿”ã—ã¾ã™ã€‚
    - - -
    -  - numResults : æ¤œç´¢çµæžœæ•° [åž‹]int
    -  - results : ãƒ’ットã—ãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã®æƒ…å ±  [åž‹]Result åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã®é…列
    -        ï½œ
    -        â”œ id : MassBank ID [åž‹]string
    -        ï½œ title : ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚¿ã‚¤ãƒˆãƒ« [åž‹]string
    -        ï½œ formula : åˆ†å­å¼ [åž‹]string
    -        ï½œ exactMass : ç²¾å¯†è³ªé‡ [åž‹]string
    -        â”” score : ã‚¹ã‚³ã‚¢ [åž‹]string ãƒ»ãƒ»ãƒ» searchPeakDiffã®å ´åˆã¯ã€ã‚¹ã‚³ã‚¢ãƒªãƒ³ã‚°ã¯è¡Œã„ã¾ã›ã‚“ã®ã§"0"ã«ã‚»ãƒƒãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ -
    -
    -例外
    -エラーメッセージ
    -"Invalid parameter : xxxxx" : ãƒ‘ラメータãŒä¸æ­£ãªå ´åˆ -

    - -
    -
    -■PHPソースコード
    -
    -
    -// パラメータセット
    -$mzs = array('80', '85');
    -$inte = "100";
    -$tol = "0.3";
    -$inst = array("all");
    -$ion = "Negative";
    -$params = array(
    -	"mzs" => $mzs, "relativeIntensity" => $inte,   "tolerance" => $tol,
    -	"instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0
    -);
    -
    -// メソッド呼ã³å‡ºã—
    -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
    -try {
    -	$res = $soap->searchPeakDiff( $params );
    -}
    -catch (SoapFault $e) {
    -	echo $e->getMessage();
    -	return;
    -}
    -
    -// 検索çµæžœè¡¨ç¤º
    -$ret = $res->return;
    -echo "<table>\n";
    -for ($i = 0 ; $i < $ret->numResults; $i++) {
    -	$info = $ret->result[$i];
    -	echo "<tr>\n";
    -	echo "<td>$info->title</td>";
    -	echo "<td>$info->formula</td>";
    -	echo "<td>$info->exactMass</td>";
    -	echo "<td>$info->id</td>\n";
    -	echo "</tr>\n";
    -}
    -echo "</table>\n";
    -
    -
    -
    -
    -■検索çµæžœ(実際ã®çµæžœã§ã™)
    -
    - $mzs, "relativeIntensity" => $inte, "tolerance" => $tol, - "instrumentTypes" => $inst, "ionMode" => $ion, "maxNumResults" => 0 -); - -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -//$soap = new SoapClient('http://localhost/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->searchPeakDiff( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// 検索çµæžœè¡¨ç¤º -$ret = $res->return; -echo "\n"; -for ($i = 0 ; $i < $ret->numResults; $i++) { - $info = $ret->results[$i]; - echo "\n"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; -} -echo "
    $info->title$info->formula$info->exactMass$info->id
    \n"; -?> -
    - - diff --git a/modules/apache/html/MassBank/manuals/api-doc_ja/searchSpectrum.php b/modules/apache/html/MassBank/manuals/api-doc_ja/searchSpectrum.php deleted file mode 100644 index 42acb34d..00000000 --- a/modules/apache/html/MassBank/manuals/api-doc_ja/searchSpectrum.php +++ /dev/null @@ -1,163 +0,0 @@ - - - -searchSpectrum メソッド - - - -MassBank WEB-API リファレンス -
    -

    searchSpectrum メソッド

    -類似スペクトルを検索ã—ã¾ã™ã€‚
    -
    -パラメータ
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    mzs[åž‹]string é…列ピーク㮠m/z値
    intensities[åž‹]string é…列ピーク㮠intensity値
    unit[åž‹]stringTolerance値ã®å˜ä½ã€‚"unit" ã¾ãŸã¯ "ppm"を指定ã™ã‚‹ã€‚(指定ã—ãªã„å ´åˆã¯"unit")
    tolerance[åž‹]stringTolerance値。(指定ã—ãªã„å ´åˆã¯ã€"unit"指定時:0.3, "ppm"指定時:50)
    cutoff[åž‹]stringcutoffã§æŒ‡å®šã•ã‚ŒãŸå€¤ä»¥ä¸‹ã®intensityã¯ç„¡è¦–ã™ã‚‹ã€‚(指定ã—ãªã„å ´åˆã¯50)
    instrumentTypes[åž‹]string é…列 -分æžæ©Ÿå™¨ç¨®åˆ¥ã‚’指定ã™ã‚‹ï¼ˆè¤‡æ•°æŒ‡å®šå¯ï¼‰ã€‚"all"を指定ã—ãŸå ´åˆã¯ã€ã™ã¹ã¦ã®ç¨®åˆ¥ãŒæ¤œç´¢å¯¾è±¡ã«ãªã‚Šã¾ã™ã€‚
    -getInstrumentTypes メソッドã«ã¦å–å¾—ã—ãŸå€¤ä»¥å¤–ã¯æŒ‡å®šã—ãªã„ã§ãã ã•ã„。
    -
    ionMode[型]string -イオン化モード
    -"Positive", "Negative", "Both"ã®ã„ãšã‚Œã‹(大文字・å°æ–‡å­—区別ãªã—)を指定ã—ã¾ã™ã€‚
    -
    maxNumResults[åž‹]int検索çµæžœæ•°ã®ä¸Šé™ã€‚"0"を指定ã—ãŸå ´åˆã¯ã™ã¹ã¦ã‚’å–å¾—ã—ã¾ã™ã€‚
    - -

    -レスãƒãƒ³ã‚¹
    -検索çµæžœã‚’ SearchResult åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã§è¿”ã—ã¾ã™ã€‚
    - - -
    -  - numResults : æ¤œç´¢çµæžœæ•° [åž‹]int
    -  - results : ãƒ’ットã—ãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã®æƒ…å ±  [åž‹]Result åž‹ï¼ˆä»¥ä¸‹ã®æ§‹é€ ä½“)ã®é…列
    -        ï½œ
    -        â”œ id : MassBank ID [åž‹]string
    -        ï½œ title : ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚¿ã‚¤ãƒˆãƒ« [åž‹]string
    -        ï½œ formula : åˆ†å­å¼ [åž‹]string
    -        ï½œ exactMass : ç²¾å¯†è³ªé‡ [åž‹]string
    -        â”” score : ã‚¹ã‚³ã‚¢ [åž‹]string
    -
    -
    -例外
    -エラーメッセージ
    -"Invalid parameter : xxxxx" : ãƒ‘ラメータãŒä¸æ­£ãªå ´åˆ -

    - -
    -
    -■PHPソースコード
    -
    -
    -// パラメータセット
    -$mzs = array('273.096', '289.086', '290.118', '291.096', '292.113', '579.169', '580.179');
    -$inte = array('300', '300', '300', '300', '300', '300', '300' );
    -$unit = "";		// unit値ã¯çœç•¥å¯(デフォルト"unit")
    -$tol = "";			// tolerance値ã¯çœç•¥å¯(デフォルト"0.3")
    -$cutoff = "";		// cutoff値ã¯çœç•¥å¯(デフォルト"50")
    -$inst = array("all");
    -$ion = "Positive";
    -$params = array(
    -	"mzs" => $mzs, "intensities" => $inte,   "unit" => $unit,
    -	"tolerance" => $tol, "cutoff" => $cutoff, "instrumentTypes" => $inst,
    -	"ionMode" => $ion, "maxNumResults" => 20
    -);
    -
    -// メソッド呼ã³å‡ºã—
    -$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl');
    -try {
    -	$res = $soap->searchSpectrum( $params );
    -}
    -catch (SoapFault $e) {
    -	echo $e->getMessage();
    -	return;
    -}
    -
    -// 検索çµæžœè¡¨ç¤º
    -$ret = $res->return;
    -echo "<table>\n";
    -for ($i = 0 ; $i < $ret->numResults; $i++) {
    -	$info = $ret->results[$i];
    -	echo "<tr>\n";
    -	echo "<td>$info->score</td>";
    -	echo "<td>$info->title</td>";
    -	echo "<td>$info->formula</td>";
    -	echo "<td>$info->exactMass</td>";
    -	echo "<td>$info->id</td>\n";
    -	echo "</tr>\n";
    -}
    -echo "</table>\n";
    -
    -
    -
    -
    -■検索çµæžœ(実際ã®çµæžœã§ã™)
    -
    - $mzs, "intensities" => $inte, "unit" => $unit, - "tolerance" => $tol, "cutoff" => $cutoff, "instrumentTypes" => $inst, - "ionMode" => $ion, "maxNumResults" => 20 -); - - -//$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); -$soap = new SoapClient('http://localhost/api/services/MassBankAPI?wsdl'); -try { - $res = $soap->searchSpectrum( $params ); -} -catch (SoapFault $e) { - echo $e->getMessage(); - return; -} - -// 検索çµæžœè¡¨ç¤º -$ret = $res->return; -echo "\n"; -for ($i = 0 ; $i < $ret->numResults; $i++) { - $info = $ret->results[$i]; - echo "\n"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; -} -echo "
    $info->score$info->title$info->formula$info->exactMass$info->id
    \n"; -?> -
    - - diff --git a/modules/apache/html/MassBank/massbank.conf b/modules/apache/html/MassBank/massbank.conf deleted file mode 100644 index 046c906d..00000000 --- a/modules/apache/html/MassBank/massbank.conf +++ /dev/null @@ -1,18 +0,0 @@ - - - Personal MassBank - Personal MassBank - - - MassBank - 3,5 - - - /var/www/html/ - 60 - false - 10 - 25 - true - 30 - diff --git a/modules/apache/html/MassBank/sitemap.xml b/modules/apache/html/MassBank/sitemap.xml deleted file mode 100644 index 2c0e1ee7..00000000 --- a/modules/apache/html/MassBank/sitemap.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - http://massbank.eu/MassBank/ - always - 0.5 - - - - http://massbank.eu/MassBank/index.html - always - 0.5 - - - http://massbank.eu/MassBank/QuickSearch.html - always - 0.5 - - - http://massbank.eu/MassBank/PeakSearch.html - always - 0.5 - - - http://massbank.eu/MassBank/RecordIndex.html - always - 1.0 - - - http://massbank.eu/MassBank/Statistics.html - always - 1.0 - - - http://massbank.eu/MassBank/jsp/Result.jsp?type=quick - always - 1.0 - - - http://massbank.eu/MassBank/DataPrivacy.html - always - 0.5 - - diff --git a/modules/apache/html/favicon.ico b/modules/apache/html/favicon.ico deleted file mode 100644 index 664fa86a..00000000 Binary files a/modules/apache/html/favicon.ico and /dev/null differ diff --git a/modules/apache/html/robots.txt b/modules/apache/html/robots.txt deleted file mode 100644 index 79c7af20..00000000 --- a/modules/apache/html/robots.txt +++ /dev/null @@ -1,30 +0,0 @@ -User-agent: * -Allow: /MassBank/ -Allow: /MassBank/SVN/OpenData/ -Allow: /MassBank/manuals/ -Disallow: /api/services/MassBankAPI.MassBankAPIHttpSoap11Endpoint/$ -Disallow: /massbank.conf -Disallow: /MassBank/DB/ -Disallow: /MassBank/SVN/ -Disallow: /MassBank/files/ -Disallow: /MassBank/cgi-bin/ -Disallow: /MassBank/script/ -Disallow: /MassBank/swn_wc/ -Disallow: /MassBank/download/ -Disallow: /piwik/ -Sitemap: http://massbank.eu/MassBank/sitemapindex.xml - -User-agent: googlebot -Allow: /MassBank/ -Allow: /MassBank/manuals/ -Allow: /MassBank/SVN/OpenData/ -Disallow: /api/services/MassBankAPI.MassBankAPIHttpSoap11Endpoint/$ -Disallow: /massbank.conf -Disallow: /MassBank/DB/ -Disallow: /MassBank/SVN/ -Disallow: /MassBank/files/ -Disallow: /MassBank/cgi-bin/ -Disallow: /MassBank/swn_wc -Disallow: /MassBank/download/ -Disallow: /piwik/ -Sitemap: http://massbank.eu/MassBank/sitemapindex.xml diff --git a/modules/tomcat/conf/20massbank.policy b/modules/tomcat/conf/20massbank.policy deleted file mode 100644 index 49060312..00000000 --- a/modules/tomcat/conf/20massbank.policy +++ /dev/null @@ -1,46 +0,0 @@ -// ========== WEB APPLICATION PERMISSIONS ===================================== - -grant codeBase "file:/var/lib/tomcat7/webapps/MassBank/WEB-INF/lib/commons-httpclient-2.0-final.jar" { - permission java.net.SocketPermission "localhost:8080", "resolve"; - // permission java.net.SocketPermission "massbank.ipb-sub.ipb-halle.de:8080", "resolve"; - permission java.util.PropertyPermission "apache.commons.httpclient.cookiespec", "read"; - permission java.util.PropertyPermission "file.encoding", "read"; - permission java.util.PropertyPermission "httpclient.authentication.preemptive", "read"; - permission java.util.PropertyPermission "httpclient.useragent", "read"; - permission java.net.SocketPermission "192.168.*:8080", "connect,resolve"; -}; - -grant codeBase "file:/var/lib/tomcat7/webapps/MassBank/WEB-INF/lib/massbank.jar" { - // Access the tomcat on Port 8080 - permission java.net.SocketPermission "localhost:8080", "connect,resolve"; - permission java.util.PropertyPermission "elementAttributeLimit", "read"; - permission java.util.PropertyPermission "entityExpansionLimit", "read"; - permission java.util.PropertyPermission "maxOccurLimit", "read"; - permission java.util.PropertyPermission "httpclient.authentication.preemptive", "read"; -}; - -grant codeBase "file:/${catalina.home}/bin/tomcat-juli.jar" { - permission java.lang.RuntimePermission "accessClassInPackage.sun.util.logging.resources"; - permission java.util.PropertyPermission "user.timezone", "write"; -}; - -grant codeBase "file:${catalina.home}/work/Catalina/localhost/MassBank/" { - permission java.lang.RuntimePermission "accessClassInPackage.sun.util.logging.resources"; - permission java.util.PropertyPermission "user.timezone", "write"; - permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.loader"; - permission java.net.SocketPermission "localhost:8080", "connect,resolve"; - permission java.util.PropertyPermission "apache.commons.httpclient.cookiespec", "read"; - permission java.util.PropertyPermission "elementAttributeLimit", "read"; - permission java.util.PropertyPermission "entityExpansionLimit", "read"; - permission java.util.PropertyPermission "file.encoding", "read"; - permission java.util.PropertyPermission "httpclient.authentication.preemptive", "read"; - permission java.util.PropertyPermission "httpclient.useragent", "read"; - permission java.util.PropertyPermission "maxOccurLimit", "read"; - - permission java.util.PropertyPermission "java.io.tmpdir", "read"; - permission java.io.FilePermission "/var/www/html/MassBank/DB/annotation", "read,write"; - - permission java.io.FilePermission "/usr/share/tomcat7/temp", "read,write"; - permission java.io.FilePermission "/var/lib/tomcat7/webapps/MassBank/jsp", "read"; - -}; diff --git a/modules/tomcat/conf/web.xml b/modules/tomcat/conf/web.xml deleted file mode 100644 index 319a360d..00000000 --- a/modules/tomcat/conf/web.xml +++ /dev/null @@ -1,1234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - default - org.apache.catalina.servlets.DefaultServlet - - debug - 0 - - - listings - false - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jsp - org.apache.jasper.servlet.JspServlet - - fork - false - - - xpoweredBy - false - - - - - trimSpaces - true - - - - 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - default - / - - - - - - - - jsp - *.jsp - - - - jsp - *.jspx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 30 - - - - - - - - - - - - abs - audio/x-mpeg - - - ai - application/postscript - - - aif - audio/x-aiff - - - aifc - audio/x-aiff - - - aiff - audio/x-aiff - - - aim - application/x-aim - - - art - image/x-jg - - - asf - video/x-ms-asf - - - asx - video/x-ms-asf - - - au - audio/basic - - - avi - video/x-msvideo - - - avx - video/x-rad-screenplay - - - bcpio - application/x-bcpio - - - bin - application/octet-stream - - - bmp - image/bmp - - - body - text/html - - - cdf - application/x-netcdf - - - cer - application/x-x509-ca-cert - - - class - application/java - - - cpio - application/x-cpio - - - csh - application/x-csh - - - css - text/css - - - dib - image/bmp - - - doc - application/msword - - - dtd - application/xml-dtd - - - dv - video/x-dv - - - dvi - application/x-dvi - - - eps - application/postscript - - - etx - text/x-setext - - - exe - application/octet-stream - - - gif - image/gif - - - gtar - application/x-gtar - - - gz - application/x-gzip - - - - - tgz - application/x-tar-gz - - - - - hdf - application/x-hdf - - - htc - text/x-component - - - htm - text/html - - - html - text/html - - - hqx - application/mac-binhex40 - - - ico - image/x-icon - - - ief - image/ief - - - jad - text/vnd.sun.j2me.app-descriptor - - - jar - application/java-archive - - - java - text/plain - - - jnlp - application/x-java-jnlp-file - - - jpe - image/jpeg - - - jpeg - image/jpeg - - - jpg - image/jpeg - - - js - text/javascript - - - jsf - text/plain - - - jspf - text/plain - - - kar - audio/midi - - - latex - application/x-latex - - - m3u - audio/x-mpegurl - - - mac - image/x-macpaint - - - man - application/x-troff-man - - - mathml - application/mathml+xml - - - me - application/x-troff-me - - - mid - audio/midi - - - midi - audio/midi - - - mif - application/vnd.mif - - - mov - video/quicktime - - - movie - video/x-sgi-movie - - - mp1 - audio/x-mpeg - - - mp2 - audio/mpeg - - - mp3 - audio/mpeg - - - mp4 - video/mp4 - - - mpa - audio/x-mpeg - - - mpe - video/mpeg - - - mpeg - video/mpeg - - - mpega - audio/x-mpeg - - - mpg - video/mpeg - - - mpv2 - video/mpeg2 - - - ms - application/x-troff-ms - - - nc - application/x-netcdf - - - oda - application/oda - - - - odb - application/vnd.oasis.opendocument.database - - - - odc - application/vnd.oasis.opendocument.chart - - - - odf - application/vnd.oasis.opendocument.formula - - - - odg - application/vnd.oasis.opendocument.graphics - - - - odi - application/vnd.oasis.opendocument.image - - - - odm - application/vnd.oasis.opendocument.text-master - - - - odp - application/vnd.oasis.opendocument.presentation - - - - ods - application/vnd.oasis.opendocument.spreadsheet - - - - odt - application/vnd.oasis.opendocument.text - - - ogg - application/ogg - - - - otg - application/vnd.oasis.opendocument.graphics-template - - - - oth - application/vnd.oasis.opendocument.text-web - - - - otp - application/vnd.oasis.opendocument.presentation-template - - - - ots - application/vnd.oasis.opendocument.spreadsheet-template - - - - ott - application/vnd.oasis.opendocument.text-template - - - pbm - image/x-portable-bitmap - - - pct - image/pict - - - pdf - application/pdf - - - pgm - image/x-portable-graymap - - - pic - image/pict - - - pict - image/pict - - - pls - audio/x-scpls - - - png - image/png - - - pnm - image/x-portable-anymap - - - pnt - image/x-macpaint - - - ppm - image/x-portable-pixmap - - - pps - application/vnd.ms-powerpoint - - - ppt - application/vnd.ms-powerpoint - - - ps - application/postscript - - - psd - image/x-photoshop - - - qt - video/quicktime - - - qti - image/x-quicktime - - - qtif - image/x-quicktime - - - ras - image/x-cmu-raster - - - rdf - application/rdf+xml - - - rgb - image/x-rgb - - - rm - application/vnd.rn-realmedia - - - roff - application/x-troff - - - rtf - text/rtf - - - rtx - text/richtext - - - sh - application/x-sh - - - shar - application/x-shar - - - - smf - audio/x-midi - - - sit - application/x-stuffit - - - snd - audio/basic - - - src - application/x-wais-source - - - sv4cpio - application/x-sv4cpio - - - sv4crc - application/x-sv4crc - - - svg - image/svg+xml - - - svgz - image/svg+xml - - - swf - application/x-shockwave-flash - - - t - application/x-troff - - - tar - application/x-tar - - - tcl - application/x-tcl - - - tex - application/x-tex - - - texi - application/x-texinfo - - - texinfo - application/x-texinfo - - - tif - image/tiff - - - tiff - image/tiff - - - tr - application/x-troff - - - tsv - text/tab-separated-values - - - txt - text/plain - - - ulw - audio/basic - - - ustar - application/x-ustar - - - vrml - model/vrml - - - vsd - application/x-visio - - - vxml - application/voicexml+xml - - - wav - audio/x-wav - - - - wbmp - image/vnd.wap.wbmp - - - - wml - text/vnd.wap.wml - - - - wmlc - application/vnd.wap.wmlc - - - - wmls - text/vnd.wap.wmlscript - - - - wmlscriptc - application/vnd.wap.wmlscriptc - - - wmv - video/x-ms-wmv - - - wrl - model/vrml - - - xbm - image/x-xbitmap - - - xht - application/xhtml+xml - - - xhtml - application/xhtml+xml - - - xls - application/vnd.ms-excel - - - xml - application/xml - - - xpm - image/x-xpixmap - - - xsl - application/xml - - - xslt - application/xslt+xml - - - xul - application/vnd.mozilla.xul+xml - - - xwd - image/x-xwindowdump - - - Z - application/x-compress - - - z - application/x-compress - - - zip - application/zip - - - - - - - - - - - - - - - - index.html - index.htm - index.jsp - - - - - 400 - /error/400.html - - - 401 - /error/401.jsp - - - 403 - /error/403.html - - - 404 - /error/404.html - - - 500 - /error/500.html - - - 503 - /error/503.html - - - - diff --git a/Documentation/manuals/UserManual_en.pdf b/old_massbank_sources/Documentation/manuals/UserManual_en.pdf similarity index 100% rename from Documentation/manuals/UserManual_en.pdf rename to old_massbank_sources/Documentation/manuals/UserManual_en.pdf diff --git a/Documentation/manuals/UserManual_ja.pdf b/old_massbank_sources/Documentation/manuals/UserManual_ja.pdf similarity index 100% rename from Documentation/manuals/UserManual_ja.pdf rename to old_massbank_sources/Documentation/manuals/UserManual_ja.pdf diff --git a/Documentation/manuals/api-doc_en/api_ref.css b/old_massbank_sources/Documentation/manuals/api-doc_en/api_ref.css similarity index 100% rename from Documentation/manuals/api-doc_en/api_ref.css rename to old_massbank_sources/Documentation/manuals/api-doc_en/api_ref.css diff --git a/Documentation/manuals/api-doc_en/getInst.php b/old_massbank_sources/Documentation/manuals/api-doc_en/getInst.php similarity index 100% rename from Documentation/manuals/api-doc_en/getInst.php rename to old_massbank_sources/Documentation/manuals/api-doc_en/getInst.php diff --git a/Documentation/manuals/api-doc_en/getPeak.php b/old_massbank_sources/Documentation/manuals/api-doc_en/getPeak.php similarity index 100% rename from Documentation/manuals/api-doc_en/getPeak.php rename to old_massbank_sources/Documentation/manuals/api-doc_en/getPeak.php diff --git a/Documentation/manuals/api-doc_en/getRecordInfo.php b/old_massbank_sources/Documentation/manuals/api-doc_en/getRecordInfo.php similarity index 100% rename from Documentation/manuals/api-doc_en/getRecordInfo.php rename to old_massbank_sources/Documentation/manuals/api-doc_en/getRecordInfo.php diff --git a/Documentation/manuals/api-doc_en/reference.html b/old_massbank_sources/Documentation/manuals/api-doc_en/reference.html similarity index 100% rename from Documentation/manuals/api-doc_en/reference.html rename to old_massbank_sources/Documentation/manuals/api-doc_en/reference.html diff --git a/Documentation/manuals/api-doc_en/searchPeak.php b/old_massbank_sources/Documentation/manuals/api-doc_en/searchPeak.php similarity index 100% rename from Documentation/manuals/api-doc_en/searchPeak.php rename to old_massbank_sources/Documentation/manuals/api-doc_en/searchPeak.php diff --git a/Documentation/manuals/api-doc_en/searchPeakDiff.php b/old_massbank_sources/Documentation/manuals/api-doc_en/searchPeakDiff.php similarity index 100% rename from Documentation/manuals/api-doc_en/searchPeakDiff.php rename to old_massbank_sources/Documentation/manuals/api-doc_en/searchPeakDiff.php diff --git a/Documentation/manuals/api-doc_en/searchSpectrum.php b/old_massbank_sources/Documentation/manuals/api-doc_en/searchSpectrum.php similarity index 100% rename from Documentation/manuals/api-doc_en/searchSpectrum.php rename to old_massbank_sources/Documentation/manuals/api-doc_en/searchSpectrum.php diff --git a/Documentation/manuals/api-doc_ja/MassBankResults.html b/old_massbank_sources/Documentation/manuals/api-doc_ja/MassBankResults.html similarity index 100% rename from Documentation/manuals/api-doc_ja/MassBankResults.html rename to old_massbank_sources/Documentation/manuals/api-doc_ja/MassBankResults.html diff --git a/Documentation/manuals/api-doc_ja/MassBankResults.txt b/old_massbank_sources/Documentation/manuals/api-doc_ja/MassBankResults.txt similarity index 100% rename from Documentation/manuals/api-doc_ja/MassBankResults.txt rename to old_massbank_sources/Documentation/manuals/api-doc_ja/MassBankResults.txt diff --git a/Documentation/manuals/api-doc_ja/api_ref.css b/old_massbank_sources/Documentation/manuals/api-doc_ja/api_ref.css similarity index 100% rename from Documentation/manuals/api-doc_ja/api_ref.css rename to old_massbank_sources/Documentation/manuals/api-doc_ja/api_ref.css diff --git a/Documentation/manuals/api-doc_ja/execBatchJob.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/execBatchJob.php similarity index 100% rename from Documentation/manuals/api-doc_ja/execBatchJob.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/execBatchJob.php diff --git a/Documentation/manuals/api-doc_ja/getInst.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/getInst.php similarity index 100% rename from Documentation/manuals/api-doc_ja/getInst.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/getInst.php diff --git a/Documentation/manuals/api-doc_ja/getJobResult.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/getJobResult.php similarity index 100% rename from Documentation/manuals/api-doc_ja/getJobResult.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/getJobResult.php diff --git a/Documentation/manuals/api-doc_ja/getJobStatus.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/getJobStatus.php similarity index 100% rename from Documentation/manuals/api-doc_ja/getJobStatus.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/getJobStatus.php diff --git a/Documentation/manuals/api-doc_ja/getPeak.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/getPeak.php similarity index 100% rename from Documentation/manuals/api-doc_ja/getPeak.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/getPeak.php diff --git a/Documentation/manuals/api-doc_ja/getRecordInfo.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/getRecordInfo.php similarity index 100% rename from Documentation/manuals/api-doc_ja/getRecordInfo.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/getRecordInfo.php diff --git a/Documentation/manuals/api-doc_ja/reference.html b/old_massbank_sources/Documentation/manuals/api-doc_ja/reference.html similarity index 100% rename from Documentation/manuals/api-doc_ja/reference.html rename to old_massbank_sources/Documentation/manuals/api-doc_ja/reference.html diff --git a/Documentation/manuals/api-doc_ja/searchPeak.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/searchPeak.php similarity index 100% rename from Documentation/manuals/api-doc_ja/searchPeak.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/searchPeak.php diff --git a/Documentation/manuals/api-doc_ja/searchPeakDiff.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/searchPeakDiff.php similarity index 100% rename from Documentation/manuals/api-doc_ja/searchPeakDiff.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/searchPeakDiff.php diff --git a/Documentation/manuals/api-doc_ja/searchSpectrum.php b/old_massbank_sources/Documentation/manuals/api-doc_ja/searchSpectrum.php similarity index 100% rename from Documentation/manuals/api-doc_ja/searchSpectrum.php rename to old_massbank_sources/Documentation/manuals/api-doc_ja/searchSpectrum.php diff --git a/tomcat/.keep b/tomcat/.keep deleted file mode 100644 index e69de29b..00000000