This workflow outlines how to transfer coordinates of CDS (ie exons) from genome scaffolds to genes. A GFF file with mRNA and CDS regions was published and with the oyster genome -Zhang, G; Fang, X; Guo, X; Li, L; Luo, R; Xu, F; Yang, P; Zhang, L; Wang, X; Qi, H; Zhu, Y; Yang, L; Huang, Z (2012) Genomic data from the Pacific oyster (Crassostrea gigas). GigaScience. http://dx.doi.org/10.5524/100030
Screenshot%205/24/13%201:47%20PM
Files were separated based on Column3 (in TextWrangler) uploaded to SQLShare. In SQLShare they were _Edited_ to have only Gene IDs in Column9 (for joining purposes). Screenshot%205/24/13%201:49%20PM

Screenshot%205/24/13%201:54%20PM
Screenshot%205/24/13%201:56%20PM

Next step is to join the two files on Column9 (GeneID) and then change Start and Stop (C4 and C5) numbers so are able to map CDS (in the correct orientation - 5' 3') to the genes. Eventually hope to develop gene specific "genome browser". **Left Join** Screenshot%205/24/13%202:01%20PM
**Creating new GFF** SELECT cd.Column9 as seqname, cd.Column2 as source, cd.Column3 as feature, Case when Column7 = '+' then Column4 - mRNA_start + 1 Else mRNA_end - Column5 + 1 END as start, Case when Column7 = '+' then Column5 - mRNA_start + 1 Else mRNA_end - Column4 + 1 END as [end], cd.Column6 as score, cd.Column7 as strand, cd.Column6 as frame, cd.Column6 as attribute FROM [sr320@washington.edu].[CDS GFF with Gene start and stop] cd Order by Column1 Desc, Column9 --makes it easy to see big genes​​​
Screenshot%205/26/13%202:41%20PM

Downloading file (CSV format) Screenshot%205/26/13%202:46%20PM
Converting CSV to Tab-delimited Screenshot%205/26/13%203:08%20PM
In TextWrangler Screenshot%205/26/13%203:10%20PM
Visualize file in IGV Screenshot%205/26/13%203:17%20PM