SEQanswers

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 07:29 AM
help needed to retrieve fasta reads from fasta db prashanthpnu Bioinformatics 1 06-21-2011 05:59 AM
Regarding Solexa data ganga.jeena Bioinformatics 1 02-03-2011 07:29 AM
Cufflinks with solexa data seq_GA Bioinformatics 6 05-13-2010 01:57 AM
solexa data weasteam Illumina/Solexa 2 02-03-2009 02:53 AM

Reply
 
Thread Tools
Old 05-16-2008, 07:00 AM   #1
JDL
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?

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

Join Date: Apr 2008
Posts: 275
Default

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

Code:
#!/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, 07:26 PM   #3
edge
Senior Member
 
Location: China

Join Date: Sep 2009
Posts: 199
Default

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

Join Date: Jul 2009
Posts: 1,543
Default

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

$ perl script_name.pl < example.fastq > example.fasta

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

$ ./script_name.pl < example.fastq > example.fasta

If you want a Python version, try something based on this cookbook recipe:
http://www.biopython.org/wiki/Reading_from_unix_pipes

e.g. With Biopython 1.52 or later:

Code:
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, 12:36 AM   #5
edge
Senior Member
 
Location: China

Join Date: Sep 2009
Posts: 199
Default

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
Reply

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 06:29 AM.


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