Forum:[META] Noticed an issue with code markup and open parentheses (
0
1
Entering edit mode
7.3 years ago
Joe 21k

I'm fairly new to the forum (actively participating that is!) but I've noticed in 2 or 3 threads so far that some elements of code syntax don't seem to be being marked up properly.

For example in my answer in the following thread, this code fails to show the ( between open and rec.id - despite the fact it is there in the raw post content. I copy and pasted the code directly too so it's not an error in copying over.

Splitting and Extracting Features in fasta format from Genbank Files using Biopython

# splitgenbank.py

from Bio import SeqIO
import sys

for rec in SeqIO.parse(sys.argv[1], "genbank"):
    SeqIO.write([rec], open(rec.id + ".gbk", "w"), "genbank")
                           ^
                        Bracket
                      disappearing

Similarly, I cant see tpaisie91's raw content, but in the code in their question in this thread: Fixing a biopython script

the print and gb_record.name should have an ( . Their code works (just doesn't output exactly what they wanted) so I think I can reasonably safely assume it's a markup error. And the exact same thing occurs with that string pattern in my answer, which, again, was a direct cut and paste of working code.

Is this a known problem?

meta markup code • 1.4k views
ADD COMMENT
1
Entering edit mode

Tagging Istvan Albert

ADD REPLY
1
Entering edit mode

That is one weird error for sure. The original raw content does contain an extra parenthesis that disappears here.

I will investigate. I'll open a github issue for it:

https://github.com/ialbert/biostar-central/issues/421

ADD REPLY

Login before adding your answer.

Traffic: 2562 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6