Hi All,
does any one know how to convert .sra files into .csfasata?
does any one know how to convert .sra files into .csfasata?
You are currently viewing the SEQanswers forums as a guest, which limits your access. Click here to register now, and join the discussion
#!/usr/bin/perl
use warnings;
use strict;
my ($infile,$outfile) = @ARGV;
die "Usage is fix_csfasta.pl [input file] [output file]\n" unless ($outfile);
open (IN,$infile) or die "Can't read $infile: $!";
open (OUT,'>',$outfile) or die "Can't write to $outfile: $!";
while (<IN>) {
if (/^>/) {
my $header = $_;
chomp $header;
$header =~ s/[\r\n]//g;
$header =~ s/[^>\w_\. ]//g;
my $seq = <IN>;
chomp $seq;
$seq =~ s/[\r\n]//g;
unless ($seq =~ /^T[0123\.]+$/) {
warn "Skipping odd looking sequence '$seq'\n";
next;
}
print OUT "$header\n$seq\n";
}
else {
warn "Skipping unexpected line : $_";
}
}
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Genome Sequencing Reveals Large, Repeat-Rich DNA in Trapdoor Spider Named for Stephen Colbert
by SEQadmin2
Started by SEQadmin2, Yesterday, 09:57 AM
|
0 responses
15 views
0 reactions
|
Last Post
by SEQadmin2
Yesterday, 09:57 AM
|
||
|
Started by SEQadmin2, Yesterday, 09:51 AM
|
0 responses
11 views
0 reactions
|
Last Post
by SEQadmin2
Yesterday, 09:51 AM
|
||
|
Started by SEQadmin2, 10-22-2026, 11:13 AM
|
0 responses
64 views
0 reactions
|
Last Post
by SEQadmin2
10-22-2026, 11:13 AM
|
||
|
Started by SEQadmin2, 10-22-2026, 10:48 AM
|
0 responses
47 views
0 reactions
|
Last Post
by SEQadmin2
10-22-2026, 10:48 AM
|
Comment