Commit b6ec5c5d authored by kbattenb's avatar kbattenb
Browse files

Removed my Japanese name from README.md.

parent 32c7a4b7
Loading
Loading
Loading
Loading

.gitlab-ci.yml

deleted100644 → 0
+0 −93
Original line number Diff line number Diff line
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options

# you can delete this line if you're not using Docker
image: busybox:latest

before_script:
  - echo "Installing cellranger dependencies"
  - apt-get install go rust rustup node python
  - export GOPATH="${HOME}/.go"
  - export GOROOT="$(brew --prefix golang)/libexec"
  - export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
  - test -d "${GOPATH}" || mkdir "${GOPATH}"
  - test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"
  - export PATH=/usr/lib/go-1.11/bin:$PATH # Add golang to path
  - rustup install 1.28.0
  - rustup default 1.28.0
  - apt-get install make clang-6.0 golang-1.11-go libz-dev libbz2-dev liblzma-dev
  - echo "Creating cellranger test install"
  - git clone https://github.com/10XGenomics/cellranger.git
  - cd cellranger
  - git checkout 3.0.2
  - make
  - cd ..

#  - mkdir -p ~/local/bin
#  - if [[ -w ~/local/bin ]]; then echo "install directory writeable"; else echo "install directory not writeable"; fi
#  - cd ~/local/bin
#  - echo "Downloading cellranger"
#  - wget -O cellranger-3.1.0.tar.gz "http://cf.10xgenomics.com/releases/cell-exp/cellranger-3.1.0.tar.gz?Expires=1564080778&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2NmLjEweGdlbm9taWNzLmNvbS9yZWxlYXNlcy9jZWxsLWV4cC9jZWxscmFuZ2VyLTMuMS4wLnRhci5neiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU2NDA4MDc3OH19fV19&Signature=m6fJx3etqOoywnpHgADfRzpCSZ04YZEe0sA3ZyVl1EQMn5Zm60qLk7v4KVPRLy6a9Qi2zE5DKWr8EpFfAg3kWqZ5-vDYtZtlYAnl0~OhtijIyYs7Rm8Uqzal-lk8tmD4SQaZQVQY~RLEed7iWq7stYwc4QTXRUjtojGqwMvqf5t4dMQbn7tNs513shjC4lGfL7~xCWpc5vaxaSN9wGSRF8ex9Hy-GsMYG2Dm8ya7ajplR1SPqTcHd9sDfro1UzOK~IGkHh9GGO9EicXQ6ypExvKB-WrDLLLZ66rEJjeNoSS6qnTKeEzyKw-3UoEYfho~Ph4eKrFS-XSZhtEX-UDItg__&Key-Pair-Id=APKAI7S6A5RYOXBWRPDA"
#  - tar -xzvf cellranger-3.1.0.tar.gz
#  - echo "Downloading reference for human genome"
#  - wget http://cf.10xgenomics.com/supp/cell-exp/refdata-cellranger-GRCh38-3.0.0.tar.gz
#  - tar -xzvf refdata-cellranger-GRCh38-3.0.0.tar.gz
  - echo "cellranger added to PATH"
  - export PATH=./cellranger:$PATH
  - cellranger --version
  - cellranger testrun --id "test"
  - cd -
  
after_script:
  - echo "Testing complete"
   
build1:
  stage: build
  script:
    - echo "testing script call"
    - bash convert.sh --version
    - bash convert.sh --help
    - echo "testing setup"
    - bash convert.sh --technology "Nadia" --setup
    - bash convert.sh --technology "10x" --setup
    - bash convert.sh --technology "iCELL8" --setup
    - echo "conversion script configured and able to write to barcodes"
   
test1:
  stage: test
  script: convert.sh
    - echo "test 10x"
    - bash convert.sh -t "10x" -r "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0" \
    - --read1 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R1_001.fastq.gz" \
    - --read2 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R2_001.fastq.gz"
    - echo "test Nadia"
    - bash convert.sh -t "Nadia" -r "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0" \
    - --read1 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R1_001.fastq.gz" \
    - --read2 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R2_001.fastq.gz"
    - echo "test iCELL8"
    - bash convert.sh -t "Nadia" -r "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0" \
    - --read1 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R1_001.fastq.gz" \
    - --read2 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R2_001.fastq.gz"
   
test2:
  stage: test 
  script: convert.sh
    - echo "test file inputs"
    - bash convert.sh -t "icell8" -r "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0" \
    - -- file "~/home/local/lib/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001" 
    - echo "test multiple lanes"
    - bash convert.sh -t "Nadia" -r "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0" \
    - --read1 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R1_001.fastq.gz" \
    - --read1 "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L002_R1_001.fastq.gz" \
    - "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001_R2_001.fastq.gz"\
    - "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L002_R2_001.fastq.gz"
    - echo "test file inputs"
    - bash convert.sh -t "icell8" -r "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0" \
    - --file "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L001" \
    - "~/home/local/bin/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/tinygex_S1_L002"

   
deploy1:
  stage: deploy
  script:
    - echo "Checks completed"
+1 −1
Original line number Diff line number Diff line
@@ -53,5 +53,5 @@ The script will:
Please note that this script alters the barcode whitelist. Known iCELL8 barcodes are supported but this is not possible with Nadia or DropSeq chemistry so 100% valid barcodes will be returned.

This is a work-in-progress and documentation with examples will be added in the future. The script is stable and functional.
Please send feedback, comments, or issues to Kai Battenberg/辻井 快 <[kai.battenberg@riken.jp](mailto:kai.battenberg@riken.jp)>
Please send feedback, comments, or issues to Kai Battenberg <[kai.battenberg@riken.jp](mailto:kai.battenberg@riken.jp)>
 or Tom Kelly <[tom.kelly@riken.jp](mailto:tom.kelly@riken.jp)>

make_10x_barcodes.sh

deleted100644 → 0
+0 −30
Original line number Diff line number Diff line
#find barcodes directory of local cellranger install
#cd /home/tom/local/bin/cellranger-2.1.0/cellranger-cs/2.1.0/lib/python/cellranger/barcodes
#cd /home/tom/local/bin/cellranger-3.0.2/cellranger-cs/3.0.2/lib/python/cellranger/barcodes
DIR=`which /home/tom/local/bin/cellranger-2.1.0/cellranger`
VERSION=`cellranger count --version | head -n 2 | tail -n 1 | cut -d"(" -f2 | cut -d")" -f1`
cd ${DIR}-cs/${VERSION}/lib/python/cellranger/barcodes

echo "update barcodes in ${DIR}-cs/${VERSION}/lib/python/cellranger/barcodes \n for cellranger version $VERSION installed in $DIR"

#restore 10x barcodes if scripts has already been run (allows changing Nadia to iCELL8)
if [ -f nadia_barcode.txt -o -f  iCELL8_barcode.txt ]
    then
    echo "restore 10x barcodes
    cp 737K-august-2016.txt.backup 737K-august-2016.txt
    fi

echo "whitelist converted for 10x compatibility with version 2 kit"

#create version 3 files if version 3 whitelist available
if [ -f 3M-february-2018.txt.gz ]
    then
    #restore 10x barcodes if scripts has already been run (allows changing Nadia to iCELL8)
    if [ -f nadia_barcode.txt -o -f  iCELL8_barcode.txt ]
        then
        echo "restore 10x barcodes
        cp 3M-february-2018.txt.gz.backup 3M-february-2018.txt.gz
        fi
    echo "whitelist converted for 10x compatibility with version 3 kit"
fi

make_iCELL8_barcodes.sh

deleted100644 → 0
+0 −61
Original line number Diff line number Diff line
#find barcodes directory of local cellranger install
#cd /home/tom/local/bin/cellranger-2.1.0/cellranger-cs/2.1.0/lib/python/cellranger/barcodes
#cd /home/tom/local/bin/cellranger-3.0.2/cellranger-cs/3.0.2/lib/python/cellranger/barcodes
DIR=`which /home/tom/local/bin/cellranger-2.1.0/cellranger`
VERSION=`cellranger count --version | head -n 2 | tail -n 1 | cut -d"(" -f2 | cut -d")" -f1`
cd ${DIR}-cs/${VERSION}/lib/python/cellranger/barcodes

echo "update barcodes in ${DIR}-cs/${VERSION}/lib/python/cellranger/barcodes \n for cellranger version $VERSION installed in $DIR"

#restore 10x barcodes if scripts has already been run (allows changing Nadia to iCELL8)
if [ -f nadia_barcode.txt -o -f  iCELL8_barcode.txt ]
    then
    echo "restore 10x barcodes"
    cp 737K-august-2016.txt.backup 737K-august-2016.txt
    fi

#create a file with every possible barcode (permutation)
if [ ! -f iCELL8_barcode.txt ]
    then
    #copy known iCell8 barcodes from convert repo to cellranger install
    cp iCell8_barcode.txt iCell8_barcode_converted.txt
    #convert barcode whitelist to match converted barcodes
    sed -i 's/^/AAAAA/g' iCell8_barcodes_converted.txt
    echo "expected barcodes generated for iCELL8"
    fi

#save original barcode file (if doesn't already exist)
if [ ! -f  737K-august-2016.txt.backup ]
    then
    echo "backup of version 2 whitelist"
    cp 737K-august-2016.txt 737K-august-2016.txt.backup
    fi

#combine 10x and Nadia barcodes
cat iCELL8_barcode_converted.txt > 737K-august-2016.txt
echo "whitelist converted for iCELL8 compatibility with version 2 kit"

#create version 3 files if version 3 whitelist available
if [ -f 3M-february-2018.txt.gz ]
    then
    #restore 10x barcodes if scripts has already been run (allows changing Nadia to iCELL8)
    if [ -f nadia_barcode.txt -o -f  iCELL8_barcode.txt ]
        then
    echo "restore 10x barcodes"
    cp 3M-february-2018.txt.gz.backup 3M-february-2018.txt.gz
        fi
    gunzip -k  3M-february-2018.txt.gz
    if [ ! -f  3M-february-2018.txt.backup.gz ]
        then
        echo "backup of version 3 whitelist"
        cp 3M-february-2018.txt 3M-february-2018.txt.backup
        gzip 3M-february-2018.txt.backup
        fi
    #combine 10x and iCELL8 barcodes
    gzip -k iCELL8_barcode.txt
    cat iCELL8_barcode_converted.txt  > 3M-february-2018.txt
    gzip -f 3M-february-2018.txt
    echo "whitelist converted for iCELL8 compatibility with version 3 kit"
    fi

make_nadia_barcodes.sh

deleted100644 → 0
+0 −57
Original line number Diff line number Diff line
#find barcodes directory of local cellranger install
#cd /home/tom/local/bin/cellranger-2.1.0/cellranger-cs/2.1.0/lib/python/cellranger/barcodes
#cd /home/tom/local/bin/cellranger-3.0.2/cellranger-cs/3.0.2/lib/python/cellranger/barcodes
DIR=`which /home/tom/local/bin/cellranger-2.1.0/cellranger`
VERSION=`cellranger count --version | head -n 2 | tail -n 1 | cut -d"(" -f2 | cut -d")" -f1`
cd ${DIR}-cs/${VERSION}/lib/python/cellranger/barcodes

echo "update barcodes in ${DIR}-cs/${VERSION}/lib/python/cellranger/barcodes \n for cellranger version $VERSION installed in $DIR"

#restore 10x barcodes if scripts has already been run (allows changing Nadia to iCELL8)
if [ -f nadia_barcode.txt -o -f  iCELL8_barcode.txt ]
    then
    echo "restore 10x barcodes"
    cp 737K-august-2016.txt.backup 737K-august-2016.txt
    fi

#create a file with every possible barcode (permutation)
if [ ! -f nadia_barcode.txt ]
    then
    echo AAAA{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G}{A,T,C,G} | sed 's/ /\n/g' > nadia_barcode.txt
    echo "expected barcodes generated for Nadia"
    fi 

#save original barcode file (if doesn't already exist)
if [ ! -f  737K-august-2016.txt.backup ]
    then
    echo backup of version 2 whitelist
    cp 737K-august-2016.txt 737K-august-2016.txt.backup
    fi

#combine 10x and Nadia barcodes
cat nadia_barcode.txt 737K-august-2016.txt.backup > 737K-august-2016.txt
echo "whitelist converted for Nadia compatibility with version 2 kit"

#create version 3 files if version 3 whitelist available
if [ -f 3M-february-2018.txt.gz ]
    then
    #restore 10x barcodes if scripts has already been run (allows changing Nadia to iCELL8)
    if [ -f nadia_barcode.txt -o -f  iCELL8_barcode.txt ]
        then
        echo "restore 10x barcodes"
        cp 3M-february-2018.txt.gz.backup 3M-february-2018.txt.gz
        fi
    gunzip -k  3M-february-2018.txt.gz
    if [ ! -f  3M-february-2018.txt.backup.gz ]
        then
        echo "backup of version 3 whitelist"
        cp 3M-february-2018.txt 3M-february-2018.txt.backup
        gzip 3M-february-2018.txt.backup
        fi
    #combine 10x and Nadia barcodes
    gzip -k nadia_barcode.txt
    zcat nadia_barcode.txt 3M-february-2018.txt.backup > 3M-february-2018.txt
    gzip -f 3M-february-2018.txt
    echo "whitelist converted for Nadia compatibility with version 3 kit"
fi