Skip to content

Commit

Permalink
revert fqfilter to remove PE bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cziegenhain committed Jul 10, 2020
1 parent d8edde4 commit 2cacbed
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 251 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ We provide a script to convert zUMIs output into loom file automatically based o
zUMIs will try to automatically do this, otherwise convert zUMIs output to loom by simply running `Rscript rds2loom.R myRun.yaml`.

## Changelog
10 July 2020: [zUMIs2.9.1](https://github.com/sdparekh/zUMIs/releases/tag/2.9.1): Revert changes from pull request #194 (commit #ff7e879) that introduced a bug when using PE reads.

05 July 2020: [zUMIs2.9.0 released](https://github.com/sdparekh/zUMIs/releases/tag/2.9.0): Speed up STAR read mapping by parallel instances if enough resources are available. Change the main zUMIs script to `zUMIs.sh`. Speed up and reduce clutter by loading reads from bam files using parallelised Rsamtools calls instead of printing temporary text files. Speed up counting by parallelising exon / intron / exon+intron counting as well as downsamplings. Speed up by parallelising creation of wide format count matrices.

23 June 2020: zUMIs2.8.3: Merged code contribution from @gringer: prevent errors by emitting SAM headers in chunked unmapped .bam file output of fqfilter. Changed call to STAR to prevent stalling of samtools pipe.
Expand Down
17 changes: 6 additions & 11 deletions distilReads.pm
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ sub makeFileHandles{

$fh="file".$j;

if ( open $fhTmp, '<', $file ) {
$file_handles{ $fh }{"id"} = $file.":".$pat.":".$fpat.":".$cframe;
$file_handles{ $fh }{"handle"} = $fhTmp;
close $fhTmp;
if ( open $fh, '<', $file ) {
$file_handles{ $fh } = $file.":".$pat.":".$fpat.":".$cframe;
close $fh;
}
else {
warn "couldn't open $file for reading: $!\n";
Expand All @@ -40,13 +39,9 @@ sub makeFileHandles{
}

sub checkPhred{
my ($bqseq) = @_;
@quals = map {$_} unpack "C*", $bqseq;
my $offset = 33;
if (grep {$_ > 74} @quals) {
$offset = 64;
}
return $offset;
@quals = map {$_} unpack "C*", $bqseq;
if(grep {$_ > 74} @quals){$offset=64;}else{$offset=33;}
return $offset;
}

sub correctFrameshift{
Expand Down
Loading

2 comments on commit 2cacbed

@gringer
Copy link
Contributor

@gringer gringer commented on 2cacbed Jul 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um... this also reverts the fix for bug #192. The removal of the 'use warnings' and 'use strict' lines will also make it harder to fix any future problems with the code.

Comment on "PE bug" from twitter:

Data with paired end cDNA reads was being written to unmapped bam files as single end reads.

@gringer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember seeing the paired end single / paired configuration setting, and thought it looked a bit odd; can't recall where, though

Please sign in to comment.