Commit 199809fa authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files
parents 1976a288 088a2103
Loading
Loading
Loading
Loading

.gitattributes

0 → 100644
+6 −0
Original line number Diff line number Diff line
test/cellranger_reference/cellranger-tiny-ref/1.2.0/ filter=lfs diff=lfs merge=lfs -text
test/cellranger_reference/cellranger-tiny-ref/1.2.0/fasta filter=lfs diff=lfs merge=lfs -text
test/cellranger_reference/cellranger-tiny-ref/1.2.0/genes filter=lfs diff=lfs merge=lfs -text
test/cellranger_reference/cellranger-tiny-ref/1.2.0/pickle filter=lfs diff=lfs merge=lfs -text
test/cellranger_reference/cellranger-tiny-ref/1.2.0/reference.json filter=lfs diff=lfs merge=lfs -text
test/cellranger_reference/cellranger-tiny-ref/1.2.0/star filter=lfs diff=lfs merge=lfs -text
+1 −3
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ RUN git clone "https://github.com/TomKellyGenetics/cellranger_convert.git"
RUN cd cellranger_convert/test/cellranger_reference/cellranger-tiny-ref/ \
 && git lfs pull


RUN cd cellranger_convert \
 && make reference \
 && cd .. 
@@ -35,5 +34,4 @@ RUN mkdir -p /cellranger-3.0.2.9001/cellranger-tiny-ref \

ENV PATH cellranger_convert:$PATH

RUN ln -s cellranger_convert/convert.sh cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/bin/convert
RUN ln -s /cellranger_convert/convert.sh /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/bin/conversion

crconverter_open.sh

0 → 100755
+321 −0
Original line number Diff line number Diff line
#!/bin/bash


######convert version#####
crconverterversion="3.1.1.90001"
##########



#####cellranger version#####
cellrangerpath=`which cellranger` #location of cellranger
if [[ -z $cellrangerpath ]]; then
    echo "cellranger command is not found."
    exit 1
fi
cellrangerversion=`cellranger count --version | head -n 2 | tail -n 1 | cut -f2 -d'(' | cut -f1 -d')'`
##########



#####declare variables#####
SOURCE="${BASH_SOURCE[0]}"
##########



#####usage statement#####
statement='crconverter

 Usage:

        crconverter <name> <type> [options]
    crconverter -h | --help | --version
'
options='

Options:
        --inpath=PATH          Path to a completed pipestance. crconvert will attempt find inputs automatically by filename
                               Explicit setting of input using other flags will override inputs found with --inpath
    --output=PATH      
    --pipestance=PATH 
    --metrics=PATH     
    --analysis=PATH    
    --matrix=PATH      
    --aggregation=PATH 
        --gemgroups=PATH   
        --contiginfo=PATH
        --peaks=PATH
        --fragmentsindex=PATH
        --geneannotations=PATH
        --geneannotationtypes=TYPES
    --description=DESC 
    -h --help          
    --version          

This is an open-source implementation of crconverter.
This is only intended for testing open-source implementations
of cellranger and may not produce the same results as
software produced by 10x Genomics. We recommend the
supported software be used for other purposes.

The code in this repository is licensed under the MIT License.
'
##########




#####print usage#####
if [[ -z $1 ]]; then
    echo "$statement"
    exit 1
fi
##########




#####declare variables#####
name=$1
type=$2
inpath=""
output=""
pipestance=""
metrics=""
analysis=""
matrix=""
aggregation=""
gemgroups=""
contiginfo=""
peaks=""
fragmentsindex=""
geneannotations=""
geneannotationtypes=""
description=""

next=false
end=false

if [[ $1 == "-h" ]] || [[ $2 == "-h" ]] || [[ $1 == "--help" ]] || [[ $2 == "--help" ]]; then
    end=true
    usage=true
    help=true
fi

if [[ $1 == "-v" ]] || [[ $2 == "-v" ]] || [[ $1 == "--version" ]] || [[ $2 == "--version" ]]; then
    end=true
    version=true
fi
shift
shift
for op in "${@}"; do
    if $next; then
        next=false;
        continue;
    fi
    case "$op" in
          --inpath)
            shift
            if [[ "$1" != "" ]]; then
                inpath="${1/%\//}"
                next=true
                shift
            else
                echo "Explicit setting of input using other flags will override inputs found with --inpath"
                shift
            fi
            ;;
           --output)
            shift
            if [[ "$1" != "" ]]; then
                output="${1/%\//}"
                next=true
                shift
            else
                output=""
            fi
            ;;
           --pipestance)
            shift
            if [[ "$1" != "" ]]; then
                pipestance="${1/%\//}"
                next=true
                shift
            else
                pipestance=""
            fi
            ;;
           --metrics)
            shift
            if [[ "$1" != "" ]]; then
                metrics="${1/%\//}"
                next=true
                shift
            else
                metrics=""
            fi
            ;;
           --analysis)
            shift
            if [[ "$1" != "" ]]; then
                analysis="${1/%\//}"
                next=true
                shift
            else
                analysis=""
            fi
            ;;
          --matrix)
            shift
            if [[ "$1" != "" ]]; then
                matrix="${1/%\//}"
                next=true
                shift
            else
                matrix=""
            fi
            ;;
           --aggregation)
            shift
            if [[ "$1" != "" ]]; then
                aggregation="${1/%\//}"
                next=true
                shift
            else
                aggregation=""
            fi
            ;;
           --gemgroups)
            shift
            if [[ "$1" != "" ]]; then
                gemgroups="${1/%\//}"
                next=true
                shift
            else
                gemgroups=""
            fi
            ;;
           --contiginfo)
            shift
            if [[ "$1" != "" ]]; then
                contiginfo="${1/%\//}"
                next=true
                shift
            else
                contiginfo=""
            fi
            ;;
           --peaks)
            shift
            if [[ "$1" != "" ]]; then
                peaks="${1/%\//}"
                next=true
                shift
            else
                peaks=""
            fi
            ;;
           --fragmentsindex)
            shift
            if [[ "$1" != "" ]]; then
                fragmentsindex="${1/%\//}"
                next=true
                shift
            else
                fragmentsindex=""
            fi
            ;;
           --geneannotations)
            shift
            if [[ "$1" != "" ]]; then
                geneannotations="${1/%\//}"
                next=true
                shift
            else
                geneannotations=""
            fi
            ;;
           --geneannotationtypes)
            shift
            if [[ "$1" != "" ]]; then
                geneannotationtypes="${1/%\//}"
                next=true
                shift
            else
                geneannotationtypes=""
            fi
            ;;
           --description)
            shift
            if [[ "$1" != "" ]]; then
                description="${1/%\//}"
                next=true
                shift
            else
                echo "Error: value missing for --description"
                exit 1
            fi
            ;;
        -v|--version)
            end=true
            version=true
            echo "$crconverterversion"
            exit 0
            ;;
        -h|--help)
            end=true
            usage=true
            help=true
            echo "$statement"
            echo "$options"
            exit 0
            ;;
       --verbose)
            echo "debugging mode activated"
            verbose=true
            next=false
            shift
            ;;
        -*)
            echo "Error: Invalid option: $op"
            exit 1
            ;;
    esac
done
##########

if [[ $end  ]]; then
    if [[ ! -z $help ]]; then
        echo "$statement"
        echo "$options"
        exit 0
    fi
fi

if [[ $end ]]; then
    if [[ ! -z $version ]]; then
        echo "$crconverterversion"
        exit 0
    fi
fi

##########

if [[ -z $output ]]; then
    echo "An output file must be specified"
    exit 1
fi

if [[ ! -f $output ]]; then
    echo "#!/bin/bash" > $output
    echo "echo \"Please use the supported release of cellranger if you wish to use .cloupe files\"" >> $output
    chmod 755 $output
else
    echo ".cloupe file already exists in $output"
fi

echo "Wrote .cloupe file to $output"
echo "Warning .cloupe file may be dysfunctional"
exit 0
+0 −4
Original line number Diff line number Diff line
@@ -5,10 +5,6 @@ install=false
######convert version#####
convertversion="0.3.0.90008"
##########



#####cellrenger version#####
cellrangerpath=`which cellranger` #location of cellranger
if [[ -z $cellrangerpath ]]; then
    echo "cellranger command is not found."
+2 −2
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@ bash /universc/launch_universc.sh -v
gunzip /universc/test/shared/cellranger-tiny-fastq/3.0.0/*fastq.gz
# test cellranger call
cellranger count --id="tiny-test" \
 --fastqs="/cellranger-3.1.0/cellranger-tiny-fastq/3.0.0/" --sample="tinygex" \
 --transcriptome="/cellranger-3.1.0/cellranger-tiny-ref/3.0.0/"
 --fastqs="/cellranger-3.0.2.9001/cellranger-tiny-fastq/3.0.0/" --sample="tinygex" \
 --transcriptome="/cellranger-3.0.2.9001/cellranger-tiny-ref/3.0.0/"

# call convert on 10x with multiple lanes
bash /universc/launch_universc.sh --id "test-10x" --technology "10x" \