Commit 9c48d7ed authored by Oriol Guitart's avatar Oriol Guitart
Browse files

Improve notebook and remove unused steps

parent 982b8af9
Pipeline #787 passed with stages
in 7 minutes and 9 seconds
......@@ -46,6 +46,16 @@
"Datasource.add(biur_virtual)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Add Library parser\n",
"\n",
"Check the *package/chemicalchecker/util/parser/parser.py* file and add a method for each one of the new libraries to parse those libraries. \n",
"The new method to parse the library should have the same name as the **molrepo_name** used in the datasource table. The output of the method should be the same as the other methods used in the **parser.py** file."
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -116,51 +126,13 @@
"Molrepo.from_molrepo_name(\"biur_virtual\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Add libraries to the structure table\n",
"\n",
"Get the inchikey-inchi pairs of the new libraries and add this information to the table structure. But only the molecules that are not already present in that table"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"import shutil\n",
"\n",
"sys.path.append(\"/aloy/home/oguitart/projects/source/chemical_checker/chemicalchecker\")\n",
"\n",
"os.environ[\"CC_CONFIG\"] = '/aloy/home/oguitart/projects/source/chemical_checker/chemicalchecker/tests/data/config.json'\n",
"\n",
"\n",
"from chemicalchecker.database import Structure, Molrepo\n",
"\n",
"# This method queries the molrepo table to get the fields that we want for the specified molrepo\n",
"molrepo_ik_inchi = Molrepo.get_fields_by_molrepo_name(\"biur_real\",[\"inchikey\",\"inchi\"])\n",
"\n",
"# This method add the inchikey-inchi pairs only for the molecules not present in the table\n",
"Structure.add_missing_only(molrepo_ik_inchi)\n",
"\n",
"# This method queries the molrepo table to get the fields that we want for the specified molrepo\n",
"molrepo_ik_inchi = Molrepo.get_fields_by_molrepo_name(\"biur_virtual\",[\"inchikey\",\"inchi\"])\n",
"\n",
"# This method add the inchikey-inchi pairs only for the molecules not present in the table\n",
"Structure.add_missing_only(molrepo_ik_inchi)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Calculate the molecular properties and store them for library \"biur_real\"\n",
"\n",
"It will also add the missing molecules to the structure table\n",
"It will create jobs to do this task in the cluster. \n",
"It waits for a molecular property calculation to finish before submitting another one. \n"
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment