-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding new verification test #1387
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
78126f5
adding new verification test
ekiernan e336154
Merge branch 'develop' into lk-pd-2778-optimus-library-verify
ekiernan cab2161
Merge branch 'develop' into lk-pd-2778-optimus-library-verify
ekiernan 8fc1d63
Merge branch 'develop' into lk-pd-2778-optimus-library-verify
ekiernan aaf4b0c
Merge branch 'develop' into lk-pd-2778-optimus-library-verify
ekiernan d932060
updating diff statements
ekiernan b7a8e0e
reconfiguring test
ekiernan 744548e
fix typo
ekiernan 5dbd9c9
remove a and b as wdl variables
ekiernan c7f0069
Merge branch 'develop' into lk-pd-2778-optimus-library-verify
ekiernan b0c4998
updating inputs on verify pipeline wdls
ekiernan 6f18810
more updates
ekiernan 9694b73
Merge branch 'lk-pd-2778-optimus-library-verify' of https://github.co…
ekiernan f6bd785
fixing indents
ekiernan 866b7b4
Merge branch 'develop' into lk-pd-2778-optimus-library-verify
ekiernan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 | ||||
---|---|---|---|---|---|---|
|
@@ -613,3 +613,53 @@ task CompareSnapTextFiles { | |||||
} | ||||||
|
||||||
|
||||||
task CompareLibraryFiles { | ||||||
input { | ||||||
File test_text_file | ||||||
File truth_text_file | ||||||
} | ||||||
|
||||||
command { | ||||||
exit_code=0 | ||||||
|
||||||
a=~{test_text_file} | ||||||
b=~{truth_text_file} | ||||||
|
||||||
echo "Sorting files $a and $b" | ||||||
sort "$a" > "a.sorted" | ||||||
sort "$b" > "b.sorted" | ||||||
|
||||||
echo "Calculating md5sums for $a and $b" | ||||||
md5_a=$(md5sum "a.sorted" | cut -d ' ' -f1) | ||||||
md5_b=$(md5sum "b.sorted" | cut -d ' ' -f1) | ||||||
|
||||||
if [ $md5_a = $md5_b ]; then | ||||||
echo "Files $a.sorted and $b.sorted have matching md5sums and are the same." | ||||||
else | ||||||
echo "Files $a.sorted and $b.sorted have different md5sums." | ||||||
|
||||||
# Compare the files, excluding specific lines | ||||||
excluded_lines="percent_doublets|keeper_cells|keeper_mean_reads_per_cell|keeper_median_genes|percent_keeper|percent_usable" | ||||||
|
||||||
# Store the diff result, but only check non-excluded lines | ||||||
diff_output=$(diff <(grep -v -E $excluded_lines a.sorted) <(grep -v -E $excluded_lines b.sorted)) | ||||||
|
||||||
if [ -z "$diff_output" ]; then | ||||||
echo "Files a.sorted and $b.sorted are the same when excluding specified lines." | ||||||
else | ||||||
echo "Files a.sorted and b.sorted have differences in non-excluded lines." | ||||||
echo "$diff_output" | ||||||
exit_code=2 | ||||||
fi | ||||||
fi | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! I reformatted. |
||||||
echo "Exiting with code $exit_code" | ||||||
exit $exit_code | ||||||
} | ||||||
|
||||||
runtime { | ||||||
docker: "gcr.io/gcp-runtimes/ubuntu_16_0_4@sha256:025124e2f1cf4d29149958f17270596bffe13fc6acca6252977c572dd5ba01bf" | ||||||
disks: "local-disk 100 HDD" | ||||||
memory: "50 GiB" | ||||||
preemptible: 3 | ||||||
} | ||||||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being super nit picky, but I think the indentation is a bit off (sometimes using 4 spaces and sometimes 2 spaces)