Skip to content

Instantly share code, notes, and snippets.

Rajarshi Guha rajarshi

Block or report user

Report or block rajarshi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View invite.txt
Associate Editors
As an Associate Editor you will receive manuscripts to handle from the Editors-in-Chief. The handling of manuscripts will involve inviting appropriate referees and making decisions on manuscripts based on referee reports and your own expertise. The final decision (to accept or reject a manuscript) will be sent to the Editors-in-Chief for approval. You would also be involved with the Editors-in-Chief and wider Editorial Board in guiding journal policy and development.
Your input is also welcomed to:
View isomf.java
@Test public void foo() throws Exception {
IsotopeFactory ifac = Isotopes.getInstance();
IIsotope c = ifac.getMajorIsotope("C");
IIsotope h = ifac.getMajorIsotope("H");
IIsotope o = ifac.getMajorIsotope("O");
IIsotope br79 = ifac.getMajorIsotope("Br");
IIsotope br81 = ifac.getIsotope("Br", 81);
MolecularFormulaRange mfRange = new MolecularFormulaRange();
View GenerateFragments.java
import chemaxon.struc.Molecule;
import chemaxon.util.MolHandler;
import gov.nih.ncgc.algo.graph.VFLib2;
import gov.nih.ncgc.descriptor.MolecularFramework;
import gov.nih.ncgc.util.ChemUtil;
import gov.nih.ncgc.util.MolStandardizer;
import org.apache.commons.dbcp2.BasicDataSource;
import java.io.BufferedReader;
import java.io.FileReader;
View gist:eaddc70225aa94caccc4d7659fb85c7a
import chemaxon.struc.Molecule;
import chemaxon.util.MolHandler;
import gov.nih.ncgc.algo.graph.VFLib2;
import gov.nih.ncgc.descriptor.MolecularFramework;
import gov.nih.ncgc.util.ChemUtil;
import gov.nih.ncgc.util.MolStandardizer;
import org.apache.commons.dbcp2.BasicDataSource;
import java.io.BufferedReader;
import java.io.FileReader;
View formula.R
library(dplyr)
library(rcdk)
all_form <- expand.grid(C=1:5, N=0:5, O=0:5, H=0:50)
all_form <- all_form %>%
mutate(formula = paste0('C',C,'N',N,'O',O,'H',H))
system.time(valid <- sapply(all_form$formula, function(x) isvalid.formula(get.formula(x))))
table(valid)
View gist:d888f7b6df33757741c19ee8da832147
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi
}
View testsa.java
public void testSA() throws FileNotFoundException, CDKException {
FileInputStream fis = new FileInputStream("/Users/guhar/tmp/after_alignment.sdf");
MDLV2000Reader reader = new MDLV2000Reader(fis, Mode.STRICT);
IAtomContainer after = reader.read(new AtomContainer());
fis = new FileInputStream("/Users/guhar/tmp/before_alignment.sdf");
reader = new MDLV2000Reader(fis, Mode.STRICT);
IAtomContainer before = reader.read(new AtomContainer());
System.out.println(before.getProperty(CDKConstants.TITLE));
System.out.println(after.getProperty(CDKConstants.TITLE));
View snippet.java
byte[] molbytes = su.getFile(new ObjectId(oid));
ByteArrayInputStream bais = new ByteArrayInputStream(molbytes);
try {
MolImporter importer = new MolImporter(bais);
List<Molecule> mols = new ArrayList<Molecule>();
while (true) {
Molecule m = importer.read();
if (m == null) break;
m.setProperty("uuid", sub.getUserUuid());
m.setProperty("pi_name", sub.getPiName());
View plot.R
library(ncgchts)
library(ggplot2)
library(RColorBrewer)
library(stringr)
data(sample.info)
con <- get.connection('hts', 'ncgc', 'probedb')
curve.order <- c(-1.1, -1.2, -2.1, -2.2, -1.3, -2.3, -1.4, -2.4, 1.1, 1.2, 2.1, 2.2, 1.3, 2.3, 1.4, 2.4, -3.0, 3.0, 4.0, 5.0)
protos <- c('s-levens-topo-HCT116-1', 's-levens-topo-mutant-1')
curves <- lapply(protos, function(p) {
View gist:12a6362e3c20f20601487edbd450d5ce
"","C01","C02","C03","C04","C05","C06"
"1071",86.38420065,79.07808678,29.7117183,103.41587423,111.10614753,8.63011858
"10800",44.29501369,6.54247662,68.01638855,66.75177262,3.54032541,68.38830847
"10919",57.126174675,5.58139873,82.08353185,31.667684375,7.363592625,92.422583695
"11200",46.98399506,7.95712996,112.22964622,31.28326229,4.60511211,129.60868594
"1268",33.44880143,5.153618,79.30898798,29.60511291,32.73451976,94.67177589
"1352",19.37561449,0.17288331,78.88568485,9.14411316,24.0009678,78.18529926
"148",3.33528891,1.60941952,78.13779848,3.15238557,4.96052261,71.51730085
"1636",12.37098707,0.907317765,88.355246405,10.96153091,4.049607285,78.91513506
"1644",97.88520438,32.16221987,80.88268546,99.14777684,29.55725639,90.61186379
You can’t perform that action at this time.