From aeb43179006ae0ac5b2edfe62d326ee90bb54ada Mon Sep 17 00:00:00 2001
From: rlyu <rlyu@svi.edu.au>
Date: Tue, 2 Mar 2021 16:16:02 +1100
Subject: [PATCH] update README

---
 README.md     | 29 ++++++++++++++++++-----------
 tests/test.sh |  4 ++--
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 788e916..68b18ab 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,26 @@
 ## sscocaller: Calling crossovers from single-sperm DNA sequencing reads
 
-It takes the large bam file which contains aligned DNA reads from a list of single sperm cells and summarizes allele
-counts for informative SNP markers. A HMM model is applied for haplotyping each sperm and viterbi algorithm is run
-for deriving the inferred haplotype sequence against the list of SNP markers.
+`sscocaller` processes DNA reads from each single sperm in the aligned and sorted BAM file for detecting crossovers by identifying haplotype shifts. It takes the large bam file which contains aligned DNA reads from a list of single sperm cells and summarizes allele counts for the provided informative SNP markers. A HMM model is applied for haplotyping each sperm and viterbi algorithm is run for deriving the inferred haplotype sequence against the list of SNP markers.
 
 ## Inputs
 
-- Bam, Reads from single sperm cells with BC tag, eg. single-cell alignment pipeline (cellranger)
-- VCF, variant calling file that contains the list of SNPs provided
-- barcodeFile, the list of cell barcodes
+- Bam, sorted and index bam file which contains DNA reads of single sperm cells with CB tag, eg. from single-cell alignment pipeline (cellranger)
+- VCF, variant calling file that contains the list of informative SNPs provided
+- barcodeFile, the list of cell barcodes of the sperm cells
+
 
 ## Outputs
-- Generate per chr allele counts matrices 
-- Sequence of inferred viterbi state (haplotype state) per chr
+
+- *.mtx
+ - sparse matrix with columns corresponding to the list of sperm cell barcodes and rows corresponding to the list of SNP positions in VCF file
+ - {sample}_chr1_altCount.mtx, a sparse mtx with entries representing alternative allele counts 
+ - {sample}_chr1_totalCount.mtx, a sparse mtx with entries representing total allele counts 
+ - {sample}_chr1_vi.mtx, a sparse mtx with entries representing inferred viterbi state (haplotype state) 
+- {sample}_chr1_snpAnnot.txt, the SNP positions and allele 
+- {sample}_chr1_SegInfo.txt, statistics of viterbi state segments in text file format.  It contains consecutive viterbi states for each chromosome with statistics including, starting SNP position, ending SNP position, the number of SNPs supporting the segment, the log likelihood ratio of the viterbi segment and the inferred hidden state.
 
 
 ## Usage
-Obtain allele counts for cell barcodes listed in barcodeFile at the SNP positions in VCF from the BAM file.
 
 ```
 Usage:
@@ -69,6 +73,8 @@ The built binary in $HOME/.nimble/bin/sscocaller
 
 `sscocaller` is also available in docker image [`svirlyu/sscocaller`] https://hub.docker.com/r/svirlyu/sscocaller
 
+It can be executed by 
+
 ```
 docker run -it svirlyu/sscocaller
 
@@ -82,14 +88,15 @@ docker run -it svirlyu/sscocaller
 
 The static bianry can be simply downloaded which works for GNU/Linux type OS: `./src/sscocaller`
 
-The static build was generated by using docker image docker://svirlyu/sscocaller_nsb
+The static build was generated by using docker image docker://svirlyu/sscocaller_nsb adapted from https://github.com/brentp/hts-nim/blob/master/Dockerfile
+
 
 ```
 /usr/local/bin/nsb -s ./src/sscocaller.nim -n sscocaller.nimble -o /mnt/src -- --d:release --threads:on
 ```
 
 
-With docker image : svirlyu/sscocaller_nsb contains the required static libraries and a static binary build of
+With docker image : `svirlyu/sscocaller_nsb` contains the required static libraries. A static binary build of
 sscocaller is available at "./src/sscocaller"
 
 
diff --git a/tests/test.sh b/tests/test.sh
index 1ab710d..99f8431 100644
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -23,8 +23,8 @@ run test_no_stdout diff tests/ccsnp-6_totalCountEXP.mtx tests/tests-6_totalCount
 assert_no_stdout  
 assert_exit_code $EX_OK
 
-run test_no_stdout diff tests/ccsnp-6_totalCountEXP.mtx tests/tests-6_totalCountEXP.mtx
+run test_no_stdout diff tests/ccsnp-6_altCountEXP.mtx tests/tests-6_altCount.mtx
 assert_no_stdout  
-assert_exit_code $EX_ERROR
+assert_exit_code $EX_OK
 
 
-- 
GitLab