Skip to content

Commit

Permalink
src/Pipelines/mapping.php: added removing of first/last two bases for…
Browse files Browse the repository at this point in the history
… Twist cfDNA samples (#188)
  • Loading branch information
leonschuetz authored Apr 3, 2023
1 parent fa0ab6a commit 5772567
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Pipelines/mapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,20 @@
$trimmed1 = $trimmed1_bc;
$trimmed2 = $trimmed2_bc;

//special handling of Twist UMIs: cut off first and last 2bp
if ($sys['umi_type'] == "Twist")
{
$trimmed1_bc = $parser->tempFile("_trimmed1_bc.fastq.gz");
$trimmed2_bc = $parser->tempFile("_trimmed2_bc.fastq.gz");
$parser->exec(get_path("ngs-bits")."FastqTrim", "-in $trimmed1 -out $trimmed1_bc -start 2", true);
$parser->exec(get_path("ngs-bits")."FastqTrim", "-in $trimmed2 -out $trimmed2_bc -start 2", true);

$parser->deleteTempFile($trimmed1);
$parser->deleteTempFile($trimmed2);
$trimmed1 = $trimmed1_bc;
$trimmed2 = $trimmed2_bc;
}

if ($sys['umi_type'] === "QIAseq")
{
$trimmed2_trim = $parser->tempFile("_trimmed2_trim.fastq.gz");
Expand Down

0 comments on commit 5772567

Please sign in to comment.