-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from sanger-bentley-group/dev
Release Version 1.0.0-rc4
- Loading branch information
Showing
7 changed files
with
94 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Basic file validation of input files | ||
# Check if read length is the same as quality-score length on all entries; if input is Gzipped, check file integrity first | ||
# Report if any read is corrupted | ||
|
||
FILE_VALIDITY="" | ||
|
||
case "$READ_ONE" in | ||
*.gz) | ||
{ | ||
gzip -t "$READ_ONE" && zcat "$READ_ONE" | paste - - - - | awk -F"\t" '{ if (length($2) != length($4)) exit 1 }' ; | ||
} || { | ||
FILE_VALIDITY+="READ_ONE_CORRUPTED;"; | ||
} | ||
{ | ||
gzip -t "$READ_TWO" && zcat "$READ_TWO" | paste - - - - | awk -F"\t" '{ if (length($2) != length($4)) exit 1 }' ; | ||
} || { | ||
FILE_VALIDITY+="READ_TWO_CORRUPTED;"; | ||
} | ||
;; | ||
*) | ||
{ | ||
cat "$READ_ONE" | paste - - - - | awk -F"\t" '{ if (length($2) != length($4)) exit 1 }' ; | ||
} || { | ||
FILE_VALIDITY+="READ_ONE_CORRUPTED;"; | ||
} | ||
{ | ||
cat "$READ_TWO" | paste - - - - | awk -F"\t" '{ if (length($2) != length($4)) exit 1 }' ; | ||
} || { | ||
FILE_VALIDITY+="READ_TWO_CORRUPTED;"; | ||
} | ||
;; | ||
esac | ||
|
||
if [[ "$FILE_VALIDITY" == "" ]]; then | ||
FILE_VALIDITY="PASS" | ||
else | ||
FILE_VALIDITY="${FILE_VALIDITY%;}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters