Hi, I want to convert my text file to a GTF, GFF3 or BED file. My file is organized like that. This is a list of operons downloaded from RegulonDB, but I need to convert it in one of this format in order to visualize them in IGV.
Column Names: 1) OPERON_ID 2) OPERON_NAME 3) FIRSTGENEPOSLEFT 4) LASTGENEPOSRIGHT 5) REGULATIONPOSLEFT 6) REGULATIONPOSRIGHT 7) OPERON_STRAND 8) KEY_ID_ORG
ECK120007527 ycaM 946452 947882 946159 947882 forward ECK12 ECK120014360 astCADBE 1823979 1830006 1823979 1830351 reverse ECK12 ECK120014361 pyrH 191855 192580 191718 192580 forward ECK12 ECK120014362 nrdHIEF 2798745 2802483 2798457 2802483 forward ECK12 ECK120014363 cpxP 4103843 4104343 4103749 4104402 forward ECK12
I do not know if there is a way to directly convert my file in one of these formats. Otherwise , what is the command to get the correct columns ? Thank you.
2 answers
Hi bonardi.franck,
All the files you mentioned are text-files with a certain formal definition. See here the bed, the gff3, and gtf descriptions.
For your purpose, it seems to me it would be best to parse your data into a bed format. You can use FIRSTGENEPOSLEFT and LASTGENEPOSRIGHT to define your region (fields 2 and 3 ) and the REGULATIONPOSLEFT and REGULATIONPOSRIGHT as thick start, resp end. For the name, you can choose the OPERON_ID, the OPERON_NAME or a mixture of both. The OPERON_STRAND needs to be converted into + or -. Still you need the chromosome name (I assume KEY_ID_ORG is this here).
You can use for instance awk or perl to reformat each line of your textfile, that you have the necessary structure. It looks something like awk '{if(match($7,/forward/)){s="+"}else{s="-"} ; print $8"\t"$3"\t"$4"\t"$1"\t"s"\t"$5"\t"$6 }' mytext.txt > myoperons.bed
Cheers,
Michael
Thanks you, it worked :) !
This is something moderator's should be able to do, in an obvious case like this. Would be nice if a user could move a misplaced comment/answer to a specific location instead of just the original question.
After I asked this I saw that @Ram had created a forum post with a similar feature request: [Feature-Request] Move as comment/reply to specific post
Your post was the last straw in a string of similar cases - that's why I raised the point in a forum post :)
EDIT: I was mistaken, it was someone else's post. The case was something like this: OP of a question added an answer to their own question. This answer should have been a comment to a different answer on the post. Unfortunately, other people commented on this misplaced answer and OP could no longer delete the answer and transfer the content to a comment because doing that would delete all responses to the answer as well. The moderator-move option should tackle this particular problem by a recursive move that moves all the target's children as well - that should be easy, because a recursive move is the default as it involves no change to the FKey of the child comments.
EDIT-2: This is the last-straw-post that I'm talking about: A: Looking for comprehensive VCF from 1000 Genomes
I must have been thinking like a great mind .. since I did not see your forum post till after I made the comment above :-)
I wonder if some other wording can be shown by default (in "add your answer" dialog, instead of "Type your post here") e.g. "ONLY use this dialog box to add an answer otherwise use "add comment/add reply" in existing posts". If the box background color for these two main options (answer and all else) can be made different then that can provide another visual cue.
The green bar above the "Add your answer" text input does state instructions. There is no easy way to validate answers being actual answers.
It is like Istvan mentioned on a similar topic - by the time the user clicks inside the Add your answer box, they have made up their mind on what they are going to do. Unless we use javascript and some alerting animations/colors to grab people's attention and give them a polite version of "Are you really sure your text is an actual answer? Go back if not", there is no way they are reading the green bar.
I'm not a UI person, but we could make the Add Comment option more prominent or the Add Answer option a bit less easy to use.
I did some browser tweaking to get this:

We could make it so that Add answers's textarea.focus() expands the div and grabs attention.
The gray "Type your post here" wording on a white background seems to draw people in like a moth to a flame.
That "Add answer" box can perhaps be kept collapsed and only made available after someone clicks "Add/Submit Answer" button. That would also make the text in the green box more prominent.
I just edited my comment above. I was thinking we could keep the box available but edit the look of the message as well as add an action element so it becomes a bit more intrusive.
The button would increase the cost of adding an answer, so that would work as well.
That change (like the red background) along with an answer box that stays collapsed by default should do the trick (we hope).
Log in to answer this question.
What is the delimiter used for the columns in your file (e.g. tab, space)? It is hard to decipher that from the post above.