Skip to content

Instantly share code, notes, and snippets.

@dyndna
Created May 21, 2015 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyndna/87fe6a1dba4a8af61db1 to your computer and use it in GitHub Desktop.
Save dyndna/87fe6a1dba4a8af61db1 to your computer and use it in GitHub Desktop.
bed to gtf conversion for PCAWG14 extended set of annotations

bed to gtf conversion for syn3606092 file, rnaseq.gc19_extNc.bed was done as follows:

Ref.: http://onetipperday.blogspot.com/2012/08/convert-bed-to-gtf.html

#wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedToGenePred
#wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/genePredToGtf
<workdir>/scripts/bedToGenePred rnaseq.gc19_extNc.bed rnaseq.gc19_extNc.btgp.genepred
<workdir>/scripts/genePredToGtf file rnaseq.gc19_extNc.btgp.genepred rnaseq.gc19_extNc.gptg.gtf

cat rnaseq.gc19_extNc.gptg.gtf | awk 'BEGIN{FS="::|transcript_id"}{printf($1"::"$2"::"$3"\"; transcript_id"$5"::"$6"::"$7"::"$8"::"$9"::"$10"::"$11"\n")}' | sed -e "s/^chrM/MT/g;s/^chr//g"  > rnaseq.gc19_extNc.gtf

http://dyndna.github.io/pcawg14_htseq/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment