ababaian / bioSyntax-archive

Syntax highlighting for computational biology
http://bioSyntax.org
GNU General Public License v3.0
16 stars 2 forks source link

Porting core syntax to gedit #15

Closed Ebedthan closed 6 years ago

Ebedthan commented 6 years ago

Hey team,

First of all i want to focus on porting core syntax to gedit. The job done already (i need your review and critics on this job, also testing it on your laptop) is in this folder.

Completed syntax

Remaining syntax

I plan to work on theses files on a daily basis and finish this work as soon as possible. I'm open to your remarks and wait for your analysis of this part of the project on what we have to do.

ababaian commented 6 years ago

@Ebedthan I used the instructions listed on our front page to install into gedit; everything copied over but now it's only coloring the headers and there is no nucleotide coloring at all.

cd ~/bioSyntax/syntax/gedit/

chmod 0644 *.lang

sudo cp *.lang /usr/share/gtksourceview-3.0/language-specs/

sudo cp bioKate.xml /usr/share/gtksourceview-3.0/styles/bioKate.xml
Ebedthan commented 6 years ago

Yes, the instructions seems a little bit more different. First of all you need to change your color scheme in gedit from classic to bioKate. So you have to add bioKate as a color scheme by selecting bioKate.xml selecting edit>preferences> font and color and click the button plus and select bioKate.xml. So this process will add bioKate as a new color scheme and to have things working as we want we need to select bioKAte as our color scheme after adding it.

Ebedthan commented 6 years ago

To avoid issues like that what do you think if we custom our page like the cd-hit page. Doing things like that have the advantage to have all instructions clearly explained in the wiki.
What do you think @ababaian ?

ababaian commented 6 years ago

I agree; but can we migrate everything over to the wiki/it's own front page when we're closer to being done? Just consider the README.md as a draft of that page for now.

You nailed it though; I'll add an instruction to change the 'theme' to bioKate in Gedit.

Ebedthan commented 6 years ago

Ok you're right.

ababaian commented 6 years ago

Note on Fasta

Great start, you've got the process down which means we're good to get developing : )

This is a little bit tricky but if you can work it out it will help all the rest of the syntaxes to be developed quickly. Take a look at Alyssa's fasta syntax in sublime. It is able to detect if a line of sequence is an amino acid and it colors them in Clustal colors or if it's Nucleotides only (ACTGUNX-.) and then it colors them as nucleotides. This concept of context aware highlighting is key to making the other formats work correctly but none of us have tried to solve this for gedit yet.

context-aware-fasta

Ebedthan commented 6 years ago

Ok got it I will work on your remarks

Ebedthan commented 6 years ago

I think the syntax/gedit/ folder can be tested now by @ababaian to see if all is correct.

Ebedthan commented 6 years ago

the sam.lang is not ready yet.

ababaian commented 6 years ago

Getting closer, good. fasta_eval2

fasta.lang Easy

Also the fast-cyesteine should be deleted unless there's a reason for it to exist?

Finally I'm about to push a new syntax folder in dev/syntax which should be used for all development purposes. We should keep the top-level syntax folder for things which are working.

ababaian commented 6 years ago

Hey @lazypanda10117 + @Ebedthan ,

I just wanted to check in with both of you since it's a bit harder to communicate remotely. You two are tasked with working on the gedit port. Ideally we all will have the core syntaxes done for the next meeting (~Nov 17th). I know it's been difficult to learn regex / syntax highlighting on your own but both of your code is looking better with each iteration.

One thing which we're slowly learning is that some of the more advanced syntaxes (PDB, SAM, VCF) will require internal logic (if --> then) to work correctly. So far really none of us have figured this out for the gedit syntax. @echu113 is our experienced programmer and is going to spend a few days looking into the sam format for gedit to see if he can find a logical way to solve this. My recommendation for all of you is to read some gedit .lang code for complex syntaxes and get a better feeling for how to use that language and share what you find with each other. If you guys really get to an impasse let me know and the others can look into helping out too.

pan-chu commented 6 years ago

https://github.com/ababaian/bioSyntax/issues/22

ababaian commented 6 years ago

Hey @Ebedthan + @lazypanda10117,

I think I might have cracked the gedit/gtksourceview syntax for getting 'robust column selection'

Check out Fasta Index Language File for an example of the logic. It's the same thing as in sublime / less where nested contexts can be used to select by column. This should make SAM/VCF/BED/GTF files much much easier to deal with.

faidx-gedit

ababaian commented 6 years ago

Helpful link for future reference: https://developer.gnome.org/gtksourceview/stable/lang-reference.html