@GenoMax, we suspected that our reads might be somehow corrupted during the ftp transer. We used fastQC to check for quality and trimming didn't seem necessary. I'm still exploring trying different tophat threds and options to speed up mapping. Thanks for your suggestions
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
Originally posted by Ntobe View PostThanks so much Brian Bushnell. The reason we trying to explore cleaning the reads is because our tophat jobs were running out of time in the server before completion. Our raw read files are too big (~13GB per .gz file) and we were thinking that some of the reads might not be of good quality. If that the case, why not remove them and map only good quality reads? Again, this might not be a good approach and that why I'm seeking help.
Comment
-
Originally posted by simonandrews View PostIf it's useful to anyone this is a small script I knocked up when we had to process some fastq files which were corrupted during an FTP transfer. You can pipe data through it and it does some basic sanity checks to ensure that the file looks like valid fastq data. It will remove any entries which look broken and leave you just the good stuff.
Code:#!/usr/bin/perl use warnings; use strict; while (<>) { unless (/^\@/) { warn "$_ should have had an \@ at the start and it didn't\n"; next; } my $id1 = $_; my $seq = <>; my $id2 = <>; my $qual = <>; if ($seq =~/^[@+]/) { warn "Sequence '$seq' looked like an id"; next; } if ($qual =~/^[@+]/) { warn "Quality '$qual' looked like an id"; next; } if ($id2 !~ /^\+/) { warn "Midline '$id2' didn't start with a +"; next; } if ($qual =~ /[GATCN]{20,}/) { warn "Quality '$qual' looked like sequence"; next; } if (length($seq) != length($qual)) { warn "Seq $seq and Qual $qual weren't the same length"; next; } print $id1,$seq,$id2,$qual; }
This is my lack of PERL shining through, but is there a way to get a two output files, one with the "good" reads and one with the "bad" reads?
Thanks,
Andor
Comment
-
Save code below in a file (check.pl in this example) and then run as
Code:$ perl check.pl input_seq.fq good.fq bad.fq
-----------------------------------
Code:#!/usr/bin/perl use warnings; use strict; my $infile = $ARGV[0]; my $outfile1 = $ARGV[1]; my $outfile2 = $ARGV[2]; open (IN, "$infile") or die "can't open the outputfile: $infile\n"; open (OUT1, ">$outfile1") or die "can't open the outputfile: $outfile1\n"; open (OUT2, ">$outfile2") or die "can't open the outputfile: $outfile2\n"; while (<>) { my $id1 = $_; my $seq = <>; my $id2 = <>; my $qual = <>; if ($id1 !~ /^[\@]/) { print OUT2 $id1,$seq,$id2,$qual; next; } if ($seq !~ /[GATCN]+/g) { print OUT2 $id1,$seq,$id2,$qual; next; } if ($id2 !~ /^\+/) { print OUT2 $id1,$seq,$id2,$qual; next; } if (length($seq) != length($qual)) { warn "Seq $seq and Qual $qual weren't the same length"; print OUT2 $id1,$seq,$id2,$qual; next; } print OUT1 $id1,$seq,$id2,$qual; } close IN; close OUT1; close OUT2;
Last edited by GenoMax; 07-26-2017, 03:12 PM.
Comment
Latest Articles
Collapse
-
by seqadmin
The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...-
Channel: Articles
04-22-2024, 07:01 AM -
-
by seqadmin
Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...-
Channel: Articles
04-04-2024, 04:25 PM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Yesterday, 11:49 AM
|
0 responses
15 views
0 likes
|
Last Post
by seqadmin
Yesterday, 11:49 AM
|
||
Started by seqadmin, 04-24-2024, 08:47 AM
|
0 responses
16 views
0 likes
|
Last Post
by seqadmin
04-24-2024, 08:47 AM
|
||
Started by seqadmin, 04-11-2024, 12:08 PM
|
0 responses
61 views
0 likes
|
Last Post
by seqadmin
04-11-2024, 12:08 PM
|
||
Started by seqadmin, 04-10-2024, 10:19 PM
|
0 responses
60 views
0 likes
|
Last Post
by seqadmin
04-10-2024, 10:19 PM
|
Comment