use of com.hartwig.hmftools.common.gene.CanonicalTranscript in project hmftools by hartwigmedical.
the class CanonicalTranscriptDAO method write.
void write(@NotNull List<CanonicalTranscript> transcripts) {
Timestamp timestamp = new Timestamp(new Date().getTime());
context.delete(CANONICALTRANSCRIPT).execute();
for (List<CanonicalTranscript> split : Iterables.partition(transcripts, DB_BATCH_INSERT_SIZE)) {
InsertValuesStep19 inserter = context.insertInto(CANONICALTRANSCRIPT, CANONICALTRANSCRIPT.GENE, CANONICALTRANSCRIPT.GENEID, CANONICALTRANSCRIPT.CHROMOSOMEBAND, CANONICALTRANSCRIPT.CHROMOSOME, CANONICALTRANSCRIPT.GENESTART, CANONICALTRANSCRIPT.GENEEND, CANONICALTRANSCRIPT.TRANSCRIPTID, CANONICALTRANSCRIPT.TRANSCRIPTVERSION, CANONICALTRANSCRIPT.TRANSCRIPTSTART, CANONICALTRANSCRIPT.TRANSCRIPTEND, CANONICALTRANSCRIPT.EXONS, CANONICALTRANSCRIPT.EXONSTART, CANONICALTRANSCRIPT.EXONEND, CANONICALTRANSCRIPT.EXONBASES, CANONICALTRANSCRIPT.CODINGSTART, CANONICALTRANSCRIPT.CODINGEND, CANONICALTRANSCRIPT.CODINGBASES, CANONICALTRANSCRIPT.STRAND, CANONICALTRANSCRIPT.MODIFIED);
split.forEach(x -> addRecord(timestamp, inserter, x));
inserter.execute();
}
}
use of com.hartwig.hmftools.common.gene.CanonicalTranscript in project hmftools by hartwigmedical.
the class LoadCanonicalTranscripts method main.
public static void main(@NotNull final String[] args) throws ParseException, SQLException {
final Options options = createBasicOptions();
final CommandLine cmd = createCommandLine(args, options);
final DatabaseAccess dbAccess = databaseAccess(cmd);
LOGGER.info("Reading gene panel");
final List<CanonicalTranscript> transcripts = CanonicalTranscriptFactory.create(HmfGenePanelSupplier.allGeneList());
LOGGER.info("Persisting transcripts to database");
dbAccess.writeCanonicalTranscripts(transcripts);
LOGGER.info("Complete");
}
Aggregations