Use subprocessPopen to make a script that connects the first
Use subprocess.Popen to make a script that connects the first 3 fastx/fastq data cleaning commands
Instead of sending output from fastq_quality_filter on to the trimmer, make it an iterable, send it to your own fastq parser, and filter for length!!!
The script should gather input parameters from a command line using any of the methods we learned last week.
Solution
-min_len <integer>
Filter sequence shorter than min_len.
-max_len <integer>
Filter sequence longer than max_len.
my @aux = undef;
while (my ($name, $seq, $qual) = readfq(\\*STDIN, \\@aux)) {
if( (length($seq) >= 21) && (length($seq) <= 25) ) {
print \"@$name\ \";
print \"$seq\ \";
print \"+\ \";
print \"$qual\ \";
}
}
