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 | ||
|---|---|---|---|---|
|
Started by SEQadmin2, Yesterday, 11:10 AM
|
0 responses
12 views
0 reactions
|
Last Post
by SEQadmin2
Yesterday, 11:10 AM
|
||
|
Single-Nucleus Sequencing Links Type 2 Diabetes Risk Variants to Specific Muscle Cell Types
by SEQadmin2
Started by SEQadmin2, 12-01-2026, 11:06 AM
|
0 responses
21 views
0 reactions
|
Last Post
by SEQadmin2
12-01-2026, 11:06 AM
|
||
|
Started by SEQadmin2, 11-23-2026, 11:11 AM
|
0 responses
60 views
0 reactions
|
Last Post
by SEQadmin2
11-23-2026, 11:11 AM
|
||
|
Started by SEQadmin2, 11-17-2026, 06:27 AM
|
0 responses
56 views
0 reactions
|
Last Post
by SEQadmin2
11-17-2026, 06:27 AM
|
Comment