Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change a regex to allow gene names with underscore #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ogs_merge/ogs_merge
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ class OgsMerger():
# FIXME CDS could be more appropriate (or maybe not...)
if not li.startswith("#") and cols[2] == 'exon':
cols[8] = re.sub(r'ID=([a-zA-Z0-9]+)', r'exID=\1', cols[8]) # remove already set id
cols[8] = re.sub(r'Parent=([a-zA-Z0-9]+)([\.0-9]+)?([-_]R[A-Z]+)?(,[a-zA-Z0-9\.\-_]*)?', r'ID=\1', cols[8]) # generate a fake id based on Parent + remove multiple parents (ie when an exon is part of multiple isoforms)
cols[8] = re.sub(r'Parent=([a-zA-Z0-9_]+)([\.0-9]+)?([-_]R[A-Z]+)?(,[a-zA-Z0-9\.\-_]*)?', r'ID=\1', cols[8]) # generate a fake id based on Parent + remove multiple parents (ie when an exon is part of multiple isoforms)
cols[8] = cols[8].rstrip(";") # gff2bed doesn't like trailing ;
print('\t'.join(cols), file=base_gff_out)
base_gff_out.close()
Expand Down