Entering edit mode
5.5 years ago
shoujun.gu
▴
350
I have several sets of genes. I'd like to know are there any easy way to make a gmx file? Thanks.
I have several sets of genes. I'd like to know are there any easy way to make a gmx file? Thanks.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Going by the definition of the gmx format from here, it seems pretty straightforward. Your question needs more details though. You have "several sets of genes", which is a concept, not data in any specific format. We can help you get from one format to another, but getting from a concept is difficult unless it is articulated better (with an example, for instance).
For example, I have several files. For each file, each line is a gene name, such as:
gene1
gene2
gene3
...
but different files has different number of genes. I want to combine these gene list files into a single gmx file, in which first row of each column is the file name. I'd like to know whether there is some way to do it easily (if file numbers and gene numbers are high)?
You can simply use
and then add a header. Or, you can replace each
fileX
with a<(awk 'BEGIN{print "genelist_name\nna"} {print $0}' fileX)
to add a header while reading the file.See dummy run:
Thank you! I will try it.