Originally posted by mmmm
View Post
Unconfigured Ad
Collapse
X
-
I wouldn't edit the script for fasta files, instead just use the script designed for fastq. You can find the script on the velvet github site. This assumes 4 line fastq. You can try Pairfq (documentation) for a more flexible solution (reading multiline fasta/q, compressed/uncompressed), but you may want to start with trying the script distributed with velvet.Last edited by SES; 04-03-2014, 01:53 AM.
-
thank you very much- also, I should change
while (defined $lineB && $lineB !~ m/>/)
to
while (defined $lineB && $lineB !~ m/^@/)
Leave a comment:
-
Are you trying to interleave fasta files or fastq files?
If it is fastq files, your script won't work because the header lines for each read should begin with '@'.
Change the two lines with the regular expressions.
Change:
toCode:while (defined $lineA && $lineA !~ m/>/) {
Code:while (defined $lineA && $lineA !~ m/^@/) {
Leave a comment:
-
If you use a recent version of velvet, you don't need to use the shuffleSequences scripts, you can leave the reads as 2 separate files and use the flag '-separate' when running velveth.
I have used the shuffleSequences_fastq.pl script that comes with velvet in the past, and never had any problems.
It is not OK if your files don't interleave properly, you will have problems with the assembly or alignment programs further downstream.
Leave a comment:
-
shuffleSequences_fastq.pl
I am using the perl script (shuffleSequences_fastq.pl) to prepare the intervaled fastq file for velvet and I got the first read in read1 followed by the first read in read2 BUT then I got 3 different reads of reads 2 followed by their correspondence in read1 and so on- I was wondering if this ok or is this below script right?
a read1
a read2
b read1
b read2
c read2
d read2
c read1
d read1 and so on
shuffleSequences_fastq.pl
#!/usr/bin/perl
if (!@ARGV) {
print "Usage: $0 forward_reads.fa reverse_reaads.fa outfile.fa\n";
print "\tforward_reads.fa / reverse_reads.fa : paired reads to be merged\n";
print "\toutfile.fa : outfile to be created\n";
system.exit(0);
}
$filenameA = $ARGV[0];
$filenameB = $ARGV[1];
$filenameOut = $ARGV[2];
die "Could not open $filenameA" unless (-e $filenameA);
die "Could not open $filenameB" unless (-e $filenameB);
open FILEA, "< $filenameA";
open FILEB, "< $filenameB";
open OUTFILE, "> $filenameOut";
my ($lineA, $lineB);
$lineA = <FILEA>;
$lineB = <FILEB>;
while(defined $lineA) {
print OUTFILE $lineA;
$lineA = <FILEA>;
while (defined $lineA && $lineA !~ m/>/) {
print OUTFILE $lineA;
$lineA = <FILEA>;
}
print OUTFILE $lineB;
$lineB = <FILEB>;
while (defined $lineB && $lineB !~ m/>/) {
print OUTFILE $lineB;
$lineB = <FILEB>;
}
}Tags: None
Latest Articles
Collapse
-
by SEQadmin2
When the Human Genome Project declared the human genome finished in 2003, portions of the sequence were still missing, including many of its most repetitive and structurally complex regions.1 Still, for the next two decades, researchers analyzed their sequencing data against the single linear reference that came out of this effort. Released in 2013 as GRCh38, that reference has powered countless discoveries, but it has gaps and cannot capture the genetic diversity of the world’s...-
Channel: Articles
11-24-2026, 07:04 AM -
ad_right_rmr
Collapse
News
Collapse
| 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
|
Leave a comment: