Can Biopython parse Derwent GENESEQ format? - biopython

I'm trying to parse files from the Derwent GENESEQ database.
The files are supposedly in EMBL formatted, but there are small differences that break SeqIO.parse('foo.dat', 'embl'). Has anyone successfully parsed these files with Biopython or other Python libs?

I ended up subclassing the Biopython EMBL parser and hacking up my own GENESEQ parser.

Related

How do I convert .bin code property graph to json?

How can I convert a code property graph(cpg) obtained from joern (https://joern.io/) from .bin format to .json format for feeding it to a graph machine learning library for classification.
Note: CPG = AST + Control Flow Graph + Program Dependency Graph
Task: Machine Learning on Source Code.
You can use scala script 'graph-for-funcs.sc' which is included in the joern scripts directory. However you need to redirect the output in order to store it in file (since the output goes to stdout by default).
I made a custom script to do so.

tool to convert avpr file to avdl file

Avro's IDL page documents that avro-tools.jar has an idl command converting an avdl file to an avpr file. Is there a way to go in the other direction, from an avpr file to an avdl file?
I was unable to find any documentation on this matter but given that the two formats appear to contain the same data with different syntax, it should be possible to convert both ways.
I have written a java util to create a IDL from a bunch of avro schemas, part of spf4j-avro for more detail see. Makes schemas a lot more readable...

How to print out ASCII to a separate file.

I am trying to print data using
*EL PRINT
to a separate file other that jobname.dat file.
Is there any way to do this?
PS: I know how to export the data from the odb file.
Thanks
As far as I know you can't reroute that kind of input-file keyword output request to a different file. I've listed some alternatives below:
As you mention, you can script it using the Abaqus/Python API.
You can manually print results to a file of your choosing from the Viewer.
You can access the results file for postprocessing using a Fortran or C++ program (search for ABQMAIN).
You can access results and write them to a file of your choosing during the analysis using the Fortran subroutine URDFIL.

Do anybody know how to generate the rsc file of jdt's parser

Do anybody know how to generate the rsc file of jdt's parser .I mean how to serialization the rule of parser .and where can i find the detail about the rule.
I have import jdt to my code ,and try to learn the rule of the parsr.
But the serialization rule confuse .Then i can easier to learn the rule if i find the code which is used to serialization the rule to rsc file.
http://www.eclipse.org/jdt/core/howto/generate%20parser/generateParser.html
i think i hava found the answer.

Steps to follow while parsing second file through yyparse

I want to parse two files. I have Yacc/lex code which generates the parser.
It works fine when I parse the first file (a.txt) but when i parse the second file (b.txt) it returns error (syntax error), but when i parse second file(b.txt) first it can parse it smoothly.
My guess is that after reading first file when it start reading second file some buffers or states are not cleared. So i wanted to ask to know do I have to reset some buffers or states which parser maintains before proceeding for parsing second file.
I cannot paste my code over here as it is too large.
Thanks in advance.
You want a reentrant parser. Bison at least supports this, I'm not really sure if yacc does this, but switching to bison should be effectively painless.
Add %pure-parser in your grammar file.
http://www.delorie.com/gnu/docs/bison/bison_66.html
Actually I found the answer to this through some other question. The problem was in clearing the buffer so if you add a
YY_FLUSH_BUFFER
Befor opening a new file it solves the problem.

Resources