Last active
March 28, 2020 09:34
-
-
Save DrYak/ed276c4a88bf33fec0b89a62e8a6bf85 to your computer and use it in GitHub Desktop.
testing V-pipe
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
mkdir V-test | |
cd V-test | |
###################### | |
### ### | |
### Miniconda3 ### | |
### ### | |
###################### | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
# -b for batch (no question asked) | |
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/V-test/miniconda3 | |
# mind the dot (=source) | |
. ~/V-test/miniconda3/bin/activate | |
conda config --add channels defaults | |
conda config --add channels bioconda | |
conda config --add channels conda-forge | |
# we don't create envs, we will let snakemake --conda handle them | |
conda install snakemake | |
# NOTE the above commands are for setting up and running the conda | |
# environment for running commands inside it or general hacking. | |
# (e.g.: we install snakemake) | |
# They are not required for running snakemake (see below) | |
################## | |
### ### | |
### V-pipe ### | |
### ### | |
################## | |
git clone https://github.com/cbg-ethz/V-pipe.git | |
cd V-pipe | |
################ | |
### ### | |
### test ### | |
### ### | |
################ | |
# NOTE as per V-pipe github issue #10 - vicuna is currently borken, we need an externally provided reference to act as a consensus | |
ln -s HXB2.fasta references/cohort_consensus.fasta | |
### SNV + local (shorah) | |
ln -s testdata samples | |
nano vpipe.config | |
#[output] | |
#snv = True | |
#local = False | |
#global = False | |
# | |
#[general] | |
#aligner = bwa | |
snakemake -s vpipe.snake --dryrun -p --cores 2 | |
snakemake -s vpipe.snake --use-conda -p --cores 2 | |
# NOTE in the current transcript we are running snakemake from | |
# within the conda environment. | |
# - if snakemake was installed by conda, | |
# snakemake can detect it and use it | |
# - channels don't require manual setup | |
# (unless you need them for your own hacking) | |
# snakemake will use the channels specified in the rules environment | |
## Data in: variants/minority_variants.tsv | |
## Shorah data in: {sample}/variants/SNVs/REGION_1/ | |
### global haplotype (savage) | |
# ~/src/vcs/jvarkit/dist/sortsamrefname --samoutputformat BAM REF_aln.bam | ~/src/vcs/jvarkit/dist/biostar154220 -n 2000 --samoutputformat bam > REF_aln_cap2000.bam | |
# samtools collate -o project/5VM/shuffle_cap256.bam -r V-test/V-pipe/references/HXB2.fasta project/5VM/REF_aln_cap256.bam | |
# samtools fastq -1 project/5VM/5VM_cap256_R1.fastq.gz -2 project/5VM/5VM_cap256_R2.fastq.gz project/5VM/shuffle_cap256.bam | |
rm samples.tsv samples variants/ | |
mkdir -p samples/5VM_cap256/20190801/raw_data/ | |
cp ~/project/5VM/5VM_cap256_R*.fastq* samples/5VM_cap256/20190801/raw_data/ | |
mkdir -p samples/5VM_cap600/20190801/raw_data/ | |
cp ~/project/5VM/5VM_cap600_R*.fastq* samples/5VM_cap600/20190801/raw_data/ | |
nano vpipe.config | |
#[output] | |
#snv = False | |
#local = False | |
#global = True | |
# | |
#[general] | |
#aligner = bwa | |
snakemake -s vpipe.snake --dryrun -p --cores 2 | |
snakemake -s vpipe.snake --use-conda -p --cores 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment