Question: Cytoscape: is there a way to export selected sequences into a fasta file?
gravatar for retroid
5 months ago by
National Cancer Institute, NIH, Bethesda, USA
retroid10 wrote:

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.

cytoscape • 303 views
ADD COMMENTlink modified 5 months ago • written 5 months ago by retroid10

I think both your question and suggestion may be better directed at Cytoscape community.

ADD REPLYlink written 5 months ago by Mensur Dlakic5.8k

The Cytoscape help page is how I got here. Their page implies that they monitor Biostars discussions for the term Cytoscape.

ADD REPLYlink written 5 months ago by retroid10

comment moved to proper thread

ADD REPLYlink modified 5 months ago • written 5 months ago by retroid10

Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized. This comment belongs under @scooter's answer.

SUBMIT ANSWER is for new answers to original question.

ADD REPLYlink written 5 months ago by genomax85k
gravatar for scooter
5 months ago by
scooter340 wrote:

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:

  1. 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.
  2. 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

ADD COMMENTlink written 5 months ago by scooter340

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.

ADD REPLYlink written 5 months ago by retroid10

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!

ADD REPLYlink written 5 months ago by scooter340
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1109 users visited in the last hour