Setup conda environments

gene_x 0 like s 696 view s

Tags: packages, bash

  1. install rnaseq on sage

    #-- version 2 --
    conda install -c conda-forge mamba
    mamba create -n rnaseq -c conda-forge -c bioconda -c defaults python fastqc trim-galore star hisat2 picard csvtk preseq rseqc samtools
    conda activate rnaseq
    pip3 install deeptools
    pip3 install multiqc
    mamba install -c conda-forge -c bioconda -c defaults -c r stringtie subread gffread r-data.table r-gplots bioconductor-dupradar bioconductor-edger
    #(rnaseq) [jhuang@sage ~]$ which nextflow
    #/usr/local/bin/nextflow
    conda install -c bionconda fq
    mamba install -c bioconda ucsc-bedclip ucsc-bedgraphtobigwig
    mamba install -c bioconda rsem
    mamba install -c bioconda salmon
    mamba install -c conda-forge -c bioconda -c defaults -c r r-data.table r-gplots bioconductor-dupradar bioconductor-edger bioconductor-deseq2
    mamba install -c conda-forge openjdk=17
    conda install -c bioconda bedtools qualimap
    #under R
    install.packages("BiocManager")
    BiocManager::install("tximport")
    BiocManager::install("tximeta")        
    install.packages("optparse")            
    install.packages(“pheatmap”)
    (rnaseq2) [jhuang@sage Data_Soeren_RNA-seq_2023]$ nextflow run rnaseq/main.nf --input samplesheet.csv    --outdir results_GRCh38 --genome GRCh38   -profile test_full -resume --max_memory 300.GB --max_time 2400.h --save_reference --aligner star_salmon  --skip_deseq2_qc
    (rnaseq) nextflow run rnaseq/main.nf --input samplesheet.csv --outdir results_1585 --fasta 1585.fasta --gtf 1585_m_.gtf -profile test_full -resume --max_memory 200.GB --max_time 2400.h --save_reference --aligner star_salmon   --skip_rseqc --skip_dupradar --skip_preseq --skip_biotype_qc --skip_deseq2_qc --min_mapped_reads 0
    #--gtf_extra_attributes gene_name
    
    #-- version 1 --
    #conda env create -f ~/Tools/rnaseq/environment.yml
    conda create -n rnaseq -c conda-forge -c bioconda -c defaults python=3.6 fastqc trim-galore star=2.6.1d hisat2
    conda activate rnaseq
    conda install -c conda-forge -c bioconda -c defaults picard csvtk preseq rseqc samtools
    pip3 install deeptools
    pip3 install multiqc
    conda install -c bioconda stringtie subread gffread
    conda install -c conda-forge -c bioconda -c defaults -c r r-data.table r-gplots
    conda install -c conda-forge -c bioconda -c defaults -c r bioconductor-dupradar bioconductor-edger
    conda install nextflow=20.04
    
  2. install chipseq

    conda create -n chipseq -c conda-forge -c bioconda -c defaults -c r python=3.9 fastqc cutadapt trim-galore bwa samtools 
    conda activate chipseq
    conda install picard bedtools phantompeakqualtools 
    conda install -c conda-forge -c bioconda -c defaults -c r r-base 
    #ERROR_SINCE_R_NGSPLOT_ONLY_FOR_PYTHON2 conda install -c conda-forge -c bioconda -c defaults -c r r-ngsplot
    sudo apt install macs
    conda install -c bioconda multiqc
    pip3 install deeptools
    conda install nextflow=20.04
    
    #conda env chipseq2 is still NOT working.
    conda create -n chipseq2 -c conda-forge -c bioconda -c defaults python=2.7 fastqc cutadapt trim-galore bwa samtools 
    conda activate chipseq2
    conda install -c conda-forge -c bioconda -c defaults picard bedtools phantompeakqualtools 
    conda install -c conda-forge -c bioconda -c defaults -c r deeptools r-base r-ngsplot macs multiqc
    conda install -c conda-forge -c bioconda -c defaults -c r r-ade4 r-assertthat r-base r-bh r-biocmanager r-bit r-bit64 r-bitops r-blob r-catools r-codetools r-crayon r-curl r-dbi r-digest r-domc r-foreach r-formatr r-futile.logger r-futile.options r-glue r-hms r-httr r-hwriter r-idr r-iterators r-jsonlite r-lambda.r r-lattice r-latticeextra r-lazyeval r-magrittr r-mass r-matrix r-matrixstats r-memoise r-mime r-openssl r-pkgconfig r-plogr r-prettyunits r-progress r-r6 r-rcolorbrewer r-rcpp r-rcurl r-rlang r-rsqlite r-segmented r-seqinr r-snow r-spp r-stringi r-stringr r-survival r-venndiagram r-xml
    conda install -c conda-forge -c bioconda -c defaults -c r bioconductor-annotationdbi bioconductor-annotationfilter bioconductor-biobase bioconductor-biocgenerics bioconductor-biocparallel bioconductor-biomart bioconductor-biostrings bioconductor-bsgenome bioconductor-chippeakanno bioconductor-delayedarray bioconductor-ensembldb bioconductor-genomeinfodb bioconductor-genomeinfodbdata bioconductor-genomicalignments bioconductor-genomicfeatures bioconductor-genomicranges bioconductor-go.db bioconductor-graph bioconductor-iranges bioconductor-limma bioconductor-multtest bioconductor-protgenerics bioconductor-rbgl bioconductor-regioner bioconductor-rsamtools bioconductor-rsubread bioconductor-rtracklayer bioconductor-s4vectors bioconductor-shortread bioconductor-summarizedexperiment bioconductor-xvector bioconductor-zlibbioc
    conda install nextflow=20.04
    
    #first_try
    (chipseq) nextflow run NGI-ChIPseq/main.nf --reads '/home/jhuang/DATA/Data_Denise_LT_DNA_Binding/enhancer_analysis/Raw_Data/*.fastq.gz' --genome hg38 --macsconfig macs.config --saveReference --saveAlignedIntermediates --singleEnd --blacklist_filtering -profile standard --project NHDF_enhancer_analysis_hg38 -resume
    #--notrim
    (chipseq) nextflow run NGI-ChIPseq/main.nf --reads '/home/jhuang/DATA/Data_Denise_LT_DNA_Binding/enhancer_analysis/Raw_Data/*.fastq.gz' --genome hg38 --macsconfig macs.config --saveAlignedIntermediates --notrim --saveTrimmed --singleEnd --blacklist_filtering -profile standard --project NHDF_enhancer_analysis_hg38 -resume
    #test
    (chipseq) nextflow run NGI-ChIPseq/main.nf --reads '/home/jhuang/DATA/Data_Denise_LT_DNA_Binding/Raw_Data/p783_*.fastq.gz' --genome hg38 --macsconfig macs.config --saveReference --saveAlignedIntermediates --singleEnd --blacklist_filtering -profile standard --project NHDF_enhancer_analysis_hg38 -resume
    
  3. install spandx

    conda create --name spandx2 python=3.8
    conda activate spandx2
    conda install -c conda-forge -c bioconda -c defaults art trimmomatic bwa bedtools=2.28.0 seqtk pindel mosdepth samtools=1.9 picard gatk4 snpeff=4.3.1t nextflow=22 fasttree
    #[genbank copying]
    mkdir ~/miniconda3/envs/spandx2/share/snpeff-4.3.1t-5/data/WA_plasmid
    cp WA_plasmid.gb ~/miniconda3/envs/spandx2/share/snpeff-4.3.1t-5/data/WA_plasmid/genes.gbk
    vim ~/miniconda3/envs/spandx2/share/snpeff-4.3.1t-5/snpEff.config
    /home/jhuang/miniconda3/envs/spandx2/bin/snpEff build -genbank WA_plasmid      -d
    
    nextflow run spandx/main.nf --fastq "Raw_Data_RNAseq_K331A_d8_SPANDx/*.fastq.gz" --ref LT_wt.fasta --annotation --database LT_wildtype --pairing SE -resume
    (spandx2) nextflow run spandx/main.nf --fastq "raw_data/*_R{1,2}.fastq.gz" --ref WA_chr.fasta --annotation --database WA_chr -resume
    (spandx2) nextflow run spandx/main.nf --fastq "raw_data/*_R{1,2}.fastq.gz" --ref WA_plasmid.fasta --annotation --database WA_plasmid -resume
    #Note that the files in variants contain only SNPs, but the files in snippy contain SNPs+INDELs which can be used to consensus the results of SPANDx, resulting in the final results of SNPs+INDELs.
    ~/DATA/Data_Benjamin_Yersinia_SNP/variants_WA_chr$ vim snippy.core.vcf
    ~/DATA/Data_Benjamin_Yersinia_SNP/snippy_WA_chr/Wacton_S96/Wacton_S96.txt
    ~/DATA/Data_Benjamin_Yersinia_SNP/snippy_WA_chr/Wacton_S96/Wacton_S96.filt.vcf
    
    #FOLLOWING INSTALLATION CANNOT FINISH CALCULATION --> MAYBE IT NOW WORKS, BUT NEEDS TO GIVE AT LEAST SAMPLES, AS SAME AS IN SPANDX2
    conda create --name spandx python=3.8
    #conda install -c conda-forge -c bioconda -c defaults art trimmomatic bwa bedtools seqtk pindel mosdepth samtools picard gatk4 snpeff nextflow fasttree
    #-->picard-3.0.0-1, gatk4-4.4.0.0-0, snpeff-5.1-2, trimmomatic-0.39-2 installed!
    #DEBUG1: Due to using snpeff-5.1-2 by deleting the option '-t' in all 'snpEff eff -t ...' since '-t' is not a option in the new version.
    #DEBUG2: Don't login spandx after login base, since in the case the env uses /home/jhuang/anaconda3/bin/java.
    #  - /usr/bin/java: openjdk version "11.0.18" 2023-01-17
    #  - /home/jhuang/anaconda3/bin/java: openjdk version "1.8.0_152-release"
    #  - /home/jhuang/anaconda3/envs/spandx/bin/java: openjdk version "17.0.3-internal" 2022-04-19
    #DEBUG3: using '-' instead of '_'
    #  mv V_8_2_4_p600_d8_DonorI.fastq.gz    control-d8-DI.fastq.gz
    
  4. install bengal3_ac3

    conda create -n bengal3_ac3 python=3.6
    conda activate bengal3_ac3
    conda install -c conda-forge -c bioconda -c defaults  prokka 
    conda install -c conda-forge -c bioconda -c defaults  shovill mlst 
    conda install -c conda-forge -c bioconda -c defaults  trimmomatic fastqc    
    conda install -c conda-forge -c bioconda -c defaults  roary
    conda install -c conda-forge -c bioconda -c defaults  snippy
    conda install -c conda-forge -c bioconda -c defaults  fasttree raxml-ng  
    conda install -c conda-forge -c bioconda -c defaults  gubbins snp-sites
    conda install -c conda-forge -c bioconda -c defaults openjdk=11
    TODO: snippy is still NOT working in hamm, we have to run the modul  "variants_calling" on hamburg.
    
  5. install qiime1

    conda create -n qiime1 -c bioconda qiime
    
  6. export environments

    #!/bin/bash
    
    # Get a list of conda environments
    env_list=$(conda env list | awk '{print $1}' | tail -n +4)
    
    # Iterate through each environment and export it to a YAML file
    for env in $env_list; do
        echo "conda activate $env"
        echo "conda env export > \"${env}_exported.yml\""
        echo "conda deactivate"
    done
    
    #conda create --name spandx2 --clone spandx
    #conda env remove --name spandx
    
    #conda activate spandx
    #conda env export > spandx.yml
    #rsync -a -P *.yml xxx@xxx:~/xxx/xxx
    #conda env create -f spandx.yml
    
    conda activate base
    conda env export > "base_exported.yml"
    conda deactivate
    conda activate HLCA_mapping_env
    conda env export > "HLCA_mapping_env_exported.yml"
    conda deactivate
    conda activate assembly2
    conda env export > "assembly2_exported.yml"
    conda deactivate
    conda activate bac3
    conda env export > "bac3_exported.yml"
    conda deactivate
    conda activate bactopia
    conda env export > "bactopia_exported.yml"
    conda deactivate
    

like unlike

点赞本文的读者

还没有人对此文章表态


本文有评论

没有评论

看文章,发评论,不要沉默


© 2023 XGenes.com Impressum