PDA

View Full Version : Want to create refGene.txt file for bacteria, problem compliling kent source


ketan_bnf
06-11-2011, 04:26 AM
Hi all,

I want to create refGene.txt file to give as input in GS Reference Mapper as it only accepts annotation in this format.

So i downloaded kent source to make refGene.txt file, but the problem i am facing is for compiling one of application it requires libmysqlclient.a file, i tried to fuond it every where in my fedora 14 system, in /usr/lib/myql/ but no success.

so please help to sort this problem.

Have anyone tried to make refGene.txt file for bacteria? If yes, how?

can genbank or gff file used for making refGene.txt file?

Thanks.

zun
06-13-2012, 12:33 AM
Hi ketan,

Did you solve your problem? I want to create refGene.txt for Oryza.sativa, which is required by Tophat-fusion-post....

If you still track this post, please reply...

zun

swaraj
06-13-2012, 07:22 AM
Assuming you have linux 64 bit installed in your computer.

1. Download http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/gtfToGenePred.

2. Convert a downlaoded gtf annotation file into genepred extended format (tmp file)

./gtfToGenePred -genePredExt annotation.gtf tmp

3. Parse the tmp file into genepred format
awk 'BEGIN{FS="\t"};{print $12"\t"$1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$7"\t"$8"\t"$9"\t"$10}' tmp > annotation.refFlat

Hope this helps. I have used this conversion on gtf annotation files downloaded from the ensembl database. It works fine.

Richard Finney
06-13-2012, 07:33 AM
Install mysql on your fedora system.
If a sysadmin or local guru usually maintains your system, talk with them.
Otherwise, google "fedora install mysql" is your friend.
If you don't have root access, you can download and configure/make your own copy of mysql which will create this library (ibmysqlclient.a) You'll have to point to libmysqlclient.a by modifying the makefile to point to where this file is since it won't be in the place that an official install would put it.

zun
06-13-2012, 09:28 PM
> swaraj
WOW! yes I did create my own refGene.txt right now thanks to you!!
I really appreciate your help!!

zun

critmin
04-09-2013, 10:54 AM
I need to convert a file from GTF to GenePred. I downloaded gtfToGenePred executable file from UCSC and tried to run in it in Ubuntu 64 11.10 but it says "command not found". This should be the executable file (downloaded from the link swaraj posted) and not the tool that requires UCSC tool setup to run. What could be a reason for the error message I am getting?

GenoMax
04-09-2013, 11:02 AM
I need to convert a file from GTF to GenePred. I downloaded gtfToGenePred executable file from UCSC and tried to run in it in Ubuntu 64 11.10 but it says "command not found". This should be the executable file (downloaded from the link swaraj posted) and not the tool that requires UCSC tool setup to run. What could be a reason for the error message I am getting?

You may need to explicitly add execute permission to the downloaded executable ("chmod u+x gtfToGenePred") before running the program as shown by swaraj.

If you are not in the directory where gtfToGenePred is present then provide the full path "\full_path_to\gtfToGenePred" when you run the program.

critmin
04-09-2013, 11:27 AM
You may need to explicitly add execute permission to the downloaded executable ("chmod u+x gtfToGenePred") before running the program as shown by swaraj.

If you are not in the directory where gtfToGenePred is present then provide the full path "\full_path_to\gtfToGenePred" when you run the program.

Thank you! It worked. For some reason even though the file was in my current and home directory it required the full path to run. Thanks for the help!

pengchy
05-04-2013, 08:23 AM
after
chmod u+x gtfToGenePred
I got the "Segmentation fault" error message when I ./gtfToGenePred. So I want to compile this program from the source files, but both the current version jksrc.v282.zip and old version jksrc.v265.zip didn't contain the source files of gtfToGenePred. Why?

Richard Finney
05-04-2013, 12:50 PM
It seems to be there ...

wget http://hgdownload.cse.ucsc.edu/admin/jksrc.zip
Resolving hgdownload.cse.ucsc.edu... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu|128.114.119.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 96,866,800 (92M) [application/zip]
100%[===================================================================>] 96,866,800 788.69K/s ETA 00:00
15:47:58 (768.69 KB/s) - `jksrc.zip' saved [96866800/96866800]
FINISHED --15:47:58--
Downloaded: 96,866,800 bytes in 1 files
bash-3.00# unzip -l jksrc.zip | grep gtfToGenePred
0 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/
6029 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/gtfToGenePred.c
444 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/makefile
0 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/
0 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/
531 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/basic.gp
500 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/basic.info
398 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/dups.gp
312 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/dups.out
244 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/ensembl.gp
307 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/ensembl.info
226 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/geneNameAsName2.gp
592 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/impliedStop.gp
402 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/impliedStop.info
407 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/splitStop.gp
370 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/srcPre.gp
380 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/expected/srcPre.info
0 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/input/
1956 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/input/basic.gtf
2204 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/input/dups.gtf
2322 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/input/ensembl.gtf
2943 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/input/flybase.gtf
595 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/input/split.gtf
5074 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/input/splitStop.gtf
1676 04-15-13 19:13 kent/src/hg/utils/gtfToGenePred/tests/makefile

pengchy
05-09-2013, 08:25 AM
Thank you Richard, I have found the files location. I have tried to find them at src/utils/, which is the reason I haven't found them.

trakhtenberg
02-11-2015, 01:03 PM
Hello

There is another way shown here https://gist.github.com/igordot/4467f1b02234ff864e61

gtfToGenePred -genePredExt -geneNameAsName2 genes.gtf refFlat.tmp.txt
paste <(cut -f 12 refFlat.tmp.txt) <(cut -f 1-10 refFlat.tmp.txt) > refFlat.txt

Could someone please comment on pros and cons of the two approaches? It looks like they differ only in the 1st column.

Thank you