PATRIC3 / patric3_website

Legacy PATRIC Website (JBoss Portal Version)
MIT License
5 stars 2 forks source link

Data API: def line for genome_feature in fasta dna files #592

Closed mshukla1 closed 8 years ago

mshukla1 commented 8 years ago

The fasta header for the dna sequences should have the same format as the protein sequences.

https://www.patricbrc.org/api/genome_feature/?eq(genome_id,83332.12)&eq(feature_type,CDS)&eq(annotation,PATRIC)&limit(100000,0)&http_accept=application/dna+fasta

fig|83332.12.peg.1002|PATRIC.83332.12.NC_000962.CDS.1002917.1003792.fwd Outer membrane protein gtggttattccgttgctgatagcggcaatcggttacggtgcattcgagcggccccagtccgttaccggaccgaccggtgtgttgccgacactgacacc

https://www.patricbrc.org/api/genome_feature/?eq(genome_id,83332.12)&eq(feature_type,CDS)&eq(annotation,PATRIC)&limit(100000,0)&http_accept=application/protein+fasta

fig|83332.12.peg.1002|Rv0899|VBIMycTub87468_1002| Outer membrane protein [Mycobacterium tuberculosis H37Rv | 83332.12] MVIPLLIAAIGYGAFERPQSVTGPTGVLPTLTPTSTRGASALSLSLLSISRSGNTVTLIGDFPDEAAKAAL

However, before making the change, need to make sure it doesn't impact any of the existing services / functionality.

-Maulik

dmachi commented 8 years ago

Kind of afraid to change this one since several services depend on it. I know @levinas and I had worked this out in our first hackathon, but I can't remember if we added some of those other properties because he needed them or what.

What are the field names that you want to make up the string to be proper. It currently looks like this:

var row = ">" + fasta_id + " " + o.product + " [" + o.genome_name + " | " + o.genome_id + "]\n" + o.aa_sequence + "\n";

dmachi commented 8 years ago

fixed and deployed to beta.