Commit 014402dc authored by kai.b's avatar kai.b
Browse files

Merge branch 'dev' of dgt-gitlab.gsc.riken.jp:tom/cellranger_convert into kai

parents 5fe2c3e8 cf1382c3
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+2 −0
Original line number Original line Diff line number Diff line
test/internal
test-*
+13 −2
Original line number Original line Diff line number Diff line
### 0.3.0 (in development)

- custom whitelists for other technologies

- configure custom input technology (kai)

- test data for checking technologies (tom)

- bundle as docker with cellranger for install (w.i.p.)

- configure automated tested for GitLab or Travis CI


### 0.2.2
### 0.2.2


allow passing custom barcode whitelists
allow passing custom barcode whitelists (can only run in serial)


### 0.2.1
### 0.2.1


+2 −2
Original line number Original line Diff line number Diff line
### UniverSC version 0.2.2
### UniverSC version 0.3.0


Conversion script to run Nadia and iCELL8 libraries with cellranger (10x Genomics analysis tool)
Conversion script to run Nadia, iCELL8, and custom libraries with cellranger (10x Genomics analysis tool)


#### Tom Kelly (RIKEN IMS) and Kai Battenberg (RIKEN CSRS/IMS)
#### Tom Kelly (RIKEN IMS) and Kai Battenberg (RIKEN CSRS/IMS)


+21 −2
Original line number Original line Diff line number Diff line
@@ -3,7 +3,7 @@
install=false
install=false


######convert version#####
######convert version#####
convertversion="0.2.4"
convertversion="0.3.0.9001"
##########
##########




@@ -14,7 +14,7 @@ if [[ -z $cellrangerpath ]]; then
    echo "cellranger command is not found."
    echo "cellranger command is not found."
    exit 1
    exit 1
fi
fi
cellrangerversion=`cellranger count --version | head -n 2 | tail -n 1 | cut -d"(" -f2 | cut -d")" -f1` #get cellranger version
ver_info=`paste -d "\n" <(cellranger count --version) <(echo conversion script version 0.3.0.9001) | head -n 3 | tail -n 2`
##########
##########




@@ -984,6 +984,7 @@ fi
echo " adjusting UMIs of R1 files"
echo " adjusting UMIs of R1 files"
if [[ 0 -gt $umiadjust ]]; then 
if [[ 0 -gt $umiadjust ]]; then 
    for convFile in "${convFiles[@]}"; do
    for convFile in "${convFiles[@]}"; do
<<<<<<< HEAD
        toS=`printf '%0.sA' $(seq 1 $(($umiadjust * -1)))`
        toS=`printf '%0.sA' $(seq 1 $(($umiadjust * -1)))`
        toQ=`printf '%0.sI' $(seq 1 $(($umiadjust * -1)))`
        toQ=`printf '%0.sI' $(seq 1 $(($umiadjust * -1)))`
	keeplength=`echo $((${barcode_default}+${umi_default}-($umiadjust * -1)))`
	keeplength=`echo $((${barcode_default}+${umi_default}-($umiadjust * -1)))`
@@ -991,6 +992,24 @@ if [[ 0 -gt $umiadjust ]]; then
        sed -i "2~4s/$/$toS/" $convFile #Add n characters to the end of the sequence
        sed -i "2~4s/$/$toS/" $convFile #Add n characters to the end of the sequence
        sed -i "4~4s/$/$toQ/" $convFile #Add n characters to the end of the quality
        sed -i "4~4s/$/$toQ/" $convFile #Add n characters to the end of the quality
        echo "  ${convFile} adjusted"
        echo "  ${convFile} adjusted"
=======
        echo " handling $convFile ..."
        if [[ "$technology" == "nadia" ]]; then
            echo "  converting barcodes"
            sed -i '2~4s/^/AAAA/' $convFile #Add AAAA to every read
            echo "  converting quality scores"
            sed -i '4~4s/^/IIII/' $convFile #Add quality scores for added bases
            echo "  converting UMI"
            sed -i '2~4s/[NATCG][NATCG][NATCG][NATCG]$//' $convFile #Remove last 4 bases
            echo "  converting quality scores"
            sed -i '4~4s/....$//' $convFile #Replace quality scores for last 4 bases
        elif [[ "$technology" == "icell8" ]]; then
            echo "  converting barcodes"
            sed -i '2~4s/^/AAAAA/' $convFile #Add AAAAA to every read
            echo "  converting quality scores"
            sed -i '4~4s/^/IIIII/' $convFile #Add quality scores for added bases
        fi
>>>>>>> e05b998d17d2c79ec3eec9784858acde747671ae
    done
    done
fi
fi
##########
##########
+1 −0
Original line number Original line Diff line number Diff line
1.2.0
 No newline at end of file
Loading