use of edu.sdsc.mmtf.spark.webfilters.PdbjMineSearch in project mmtf-spark by sbl-sdsc.
the class AuthorSearchDemo method main.
public static void main(String[] args) throws IOException {
SparkConf conf = new SparkConf().setMaster("local[*]").setAppName(AuthorSearchDemo.class.getSimpleName());
JavaSparkContext sc = new JavaSparkContext(conf);
// query to find PDB structures for Doudna, J.A. as a deposition (audit) author
// or as an author in the primary PDB citation
String sqlQuery = "SELECT pdbid from audit_author " + "WHERE name LIKE 'Doudna%J.A.%' " + "UNION " + "SELECT pdbid from citation_author " + "WHERE citation_id = 'primary' AND name LIKE 'Doudna%J.A.%'";
// read PDB and filter by author
JavaPairRDD<String, StructureDataInterface> pdb = MmtfReader.readReducedSequenceFile(sc).filter(new PdbjMineSearch(sqlQuery));
System.out.println("Number of entries matching query: " + pdb.count());
sc.close();
}
use of edu.sdsc.mmtf.spark.webfilters.PdbjMineSearch in project mmtf-spark by sbl-sdsc.
the class KeywordSearch method main.
public static void main(String[] args) throws IOException {
SparkConf conf = new SparkConf().setMaster("local[*]").setAppName(KeywordSearch.class.getSimpleName());
JavaSparkContext sc = new JavaSparkContext(conf);
String sqlQuery = "SELECT pdbid from keyword_search('porin')";
// read PDB and filter by keyword search
JavaPairRDD<String, StructureDataInterface> pdb = MmtfReader.readReducedSequenceFile(sc).filter(new PdbjMineSearch(sqlQuery));
pdb.keys().foreach(k -> System.out.println(k));
System.out.println("Number of entries matching query: " + pdb.count());
sc.close();
}
use of edu.sdsc.mmtf.spark.webfilters.PdbjMineSearch in project mmtf-spark by sbl-sdsc.
the class KinaseSearch method main.
public static void main(String[] args) throws IOException {
SparkConf conf = new SparkConf().setMaster("local[*]").setAppName(KinaseSearch.class.getSimpleName());
JavaSparkContext sc = new JavaSparkContext(conf);
// query for human protein-serine/threonine kinases using SIFTS data
String sql = "SELECT t.pdbid, t.chain FROM sifts.pdb_chain_taxonomy AS t " + "JOIN sifts.pdb_chain_enzyme AS e ON (t.pdbid = e.pdbid AND t.chain = e.chain) " + "WHERE t.scientific_name = 'Homo sapiens' AND e.ec_number = '2.7.11.1'";
// read PDB in MMTF format, split into polymer chains and search using
// PdbJMineSearch
JavaPairRDD<String, StructureDataInterface> pdb = MmtfReader.readReducedSequenceFile(sc).flatMapToPair(new StructureToPolymerChains()).filter(new PdbjMineSearch(sql));
System.out.println("Number of entries matching query: " + pdb.count());
sc.close();
}
Aggregations