Thanks, Scooter. I'm using Cytoscape to look at .xgmml outputs from EFI-EST and I can indeed output the sequences and descriptions I want as a .csv output. Thanks for the tip. As part of a manuscript I'm about to submit, I'm posting some Cytoscape files on my lab website as a way of sharing protein sequence compilations. I was thinking of posting my inelegant Cytoscape-to-FastA Excel worksheet to enable readers to quickly extract the compiled sequences into FastA for other types of analyses, such as traditional phylogenetic tree construction (the virus evolution community still has some dead-enders I call "dendrophiliacs" who are having trouble accepting SSNs as a valid alternative to phylogenetic trees). My concern was that I was going to put egg on my face if there's already some existing easier way of exporting stuff from Cytoscape into FastA. It's useful to know there's not - thanks for your response! And - deeper than that - I offer a truly heartfelt thanks for your work on Cytoscape. Being able to quickly visualize SSNs has revolutionized the way I think about the interrelationships of the virus families my lab studies. Trees still have their uses, but I'm mostly thinking in networks now.
Cytoscape is a truly wonderful tool for viewing sequence similarity networks. The only thing I don't love about it is that it's difficult to get selected sequences out of the network and into a FastA file for other types of analyses. I developed a kludgy Excel table where I copy-paste the information from the table panel at the bottom of the Cytoscape window and the Excel table combines and edits the Description and Sequence columns into FastA format. Am I missing some simpler method for doing this? If not, I suggest to Cytoscape developers that export-to-FastA would be a useful functionality to consider adding.
1 answer
Indeed, we do monitor Biostars :-)
Where are you getting your sequence similarity network? If the network already has the sequences in a column, you should be able to export the table to a file and then read it directly into Excel. That will at least save you the cutting and pasting step. If you want to do this in a more automated fashion, there are two approaches you could take:
- An app would be pretty easy to write, but it would have to be in Java. There are lots of examples to get started if you know a Java programmer.
- Use Cytoscape automation and write a python or R module that reads the node table from Cytoscape and writes it out as a FASTA. This should be pretty simple to write (Biopython has a write method in the SeqIO package, for example) and would probably be only 10 or 15 lines of python.
Hope this helps!
-- scooter
Thanks for your kind words! Yes, ever since Patsy Babbitt and John Gerlt started looking at similarity networks, it's given us much better ways to visualize the protein universe. Kudos to them for their insights!
Log in to answer this question.
I think both your question and suggestion may be better directed at Cytoscape community.
The Cytoscape help page is how I got here. Their page implies that they monitor Biostars discussions for the term Cytoscape.
comment moved to proper thread
Please use
ADD COMMENT/ADD REPLYwhen responding to existing posts to keep threads logically organized. This comment belongs under @scooter's answer.SUBMIT ANSWERis for new answers to original question.