Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
extract data from fasta-files with perl?? anna_ Bioinformatics 20 02-17-2016 08:29 AM
help needed to retrieve fasta reads from fasta db prashanthpnu Bioinformatics 1 06-21-2011 06:59 AM
Regarding Solexa data ganga.jeena Bioinformatics 1 02-03-2011 08:29 AM
Cufflinks with solexa data seq_GA Bioinformatics 6 05-13-2010 02:57 AM
solexa data weasteam Illumina/Solexa 2 02-03-2009 03:53 AM

Thread Tools
Old 05-16-2008, 08:00 AM   #1
Junior Member
Location: The Netherlands

Join Date: May 2008
Posts: 4
Default Solexa data to fasta

For the EULER-SR program a read.fasta file is needed with all the short reads of the solexa run in fasta format.

Does anyone have a small script or program to do so?

JDL is offline   Reply With Quote
Old 06-05-2008, 05:01 AM   #2
Senior Member
Location: The University of Melbourne, AUSTRALIA

Join Date: Apr 2008
Posts: 275

This small perl script will take a Solexa seq file and convert to FASTA.

#!/usr/bin/perl -w
use strict;
while (<ARGV>) {
  my @x = split m/:/;
  next unless @x == 7;
  print ">", join(':', @x[0..4]), "\n", $x[5],"\n";
Torst is offline   Reply With Quote
Old 10-08-2009, 08:26 PM   #3
Senior Member
Location: China

Join Date: Sep 2009
Posts: 199

Hi Torst,
I just try the script, it can't work d?
edge is offline   Reply With Quote
Old 10-09-2009, 01:33 AM   #4
Peter (Biopython etc)
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543

That script is intended to be used with stdout/stdin, e.g. assuming you saved this script as a file called, and using $ to represent the command prompt:

$ perl < example.fastq > example.fasta

If you mark the script as executable (not applicable to Windows), then just:

$ ./ < example.fastq > example.fasta

If you want a Python version, try something based on this cookbook recipe:

e.g. With Biopython 1.52 or later:

import sys
from Bio import SeqIO
SeqIO.convert(sys.stdin, "fastq-solexa", sys.stdout, "fasta")
maubp is offline   Reply With Quote
Old 10-09-2009, 01:36 AM   #5
Senior Member
Location: China

Join Date: Sep 2009
Posts: 199

Thanks a lot, maudp.
I will try it again later.
See how is the output result.
Thanks for your help again
edge is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 01:46 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO