t-neumann / slamdunk

Streamlining SLAM-seq analysis with ultra-high sensitivity
GNU Affero General Public License v3.0
38 stars 23 forks source link

Unable to install slamdunk from conda #51

Closed aleighbrown closed 5 years ago

aleighbrown commented 5 years ago

conda create --name myenv -c bioconda slamdunk conda install -c bioconda/label/cf201901 slamdunk

Neither seems to work.

Install with pip seems to give a nonfunctional version based on the following errors?

slamdunk all -r /Users/annaleigh/Documents/data/Mus_musculus.GRCm38.dna.primary_assembly.fa -b /Users/annaleigh/Documents/data/gencode.vM21.annotation.bed -o /Users/annaleigh/Documents/data/slam_dunk -5 12 -t 1 -m --skip-sam /Users/annaleigh/Documents/data/raw_data/WT3A_S8_R1_001_trimmed.fastq.gz

output of the above:

"slamdunk all Creating output directory: /Users/annaleigh/Documents/data/slam_dunk/map Running slamDunk map for 1 files (1 threads) Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/slamdunk", line 11, in load_entry_point('slamdunk==0.3.4', 'console_scripts', 'slamdunk')() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slamdunk/slamdunk.py", line 478, in run runAll(args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slamdunk/slamdunk.py", line 233, in runAll runMap(tid, bam, referenceFile, n, args.trim5, args.maxPolyA, args.quantseq, args.endtoend, args.topn, sampleInfo, dunkPath, args.skipSAM) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slamdunk/slamdunk.py", line 148, in runMap mapper.Map(inputBAM, referenceFile, outputSAM, getLogFile(outputLOG), quantseqMapping, endtoendMapping, threads=threads, trim5p=trim5p, maxPolyA=maxPolyA, topn=topn, sampleId=tid, sampleName=sampleName, sampleType=sampleType, sampleTime=sampleTime, printOnly=printOnly, verbose=verbose) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slamdunk/dunks/mapper.py", line 107, in Map run(getBinary("ngm") + " -b -r " + inputReference + " -q " + inputBAM + " -t " + str(threads) + " " + parameter + " -o " + outputSAM, log, verbose=verbose, dry=printOnly)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slamdunk/utils/misc.py", line 190, in run raise RuntimeError("Error while executing command: \"" + cmd + "\"") RuntimeError: Error while executing command: "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slamdunk/contrib/ngm -b -r /Users/annaleigh/Documents/data/Mus_musculus.GRCm38.dna.primary_assembly.fa -q /Users/annaleigh/Documents/data/raw_data/WT3A_S8_R1_001_trimmed.fastq.gz -t 1 --no-progress --slam-seq 2 -5 12 --max-polya 4 -l --rg-id 0 --rg-sm sample_0:NA:-1 -o /Users/annaleigh/Documents/data/slam_dunk/map/WT3A_S8_R1_001_trimmed.fastq_slamdunk_mapped.bam""

t-neumann commented 5 years ago

Hi,

are you building this on a Mac? Looks like it. Because I disabled OSX builds, so I wonder what's going on here.

aleighbrown commented 5 years ago

Mac. Yep. I'm also have a hell of time getting it install on our linux cluster as well.

t-neumann commented 5 years ago

I just tested the latest build yesterday - have you tried build 0 also with similar issues?

What is not working for you on Linux?

aleighbrown commented 5 years ago

Testing the install again on the linux machine, will get an error to you shortly. It was something like "slam all -h" > "no module dunks"

First time trying to install yesterday, so I haven't tried any other builds yet

t-neumann commented 5 years ago

Ok. You might also want to try this before activating your slamdunk environment.

export PYTHONNOUSERSITE=1
aleighbrown commented 5 years ago

It seems to be problems with the way our cluster is set up. Long list of failed install with this at the bottom:

" 2019-05-29 17:06:09 (338 KB/s) - `RNASeqReadSimulator.tar.gz' saved [63063]

RNASeqReadSimulator-master/ RNASeqReadSimulator-master/README RNASeqReadSimulator-master/demo/ RNASeqReadSimulator-master/demo/genpairedendreads.sh RNASeqReadSimulator-master/demo/gensingleendreads.sh RNASeqReadSimulator-master/demo/genstrandedreads.sh RNASeqReadSimulator-master/demo/input/ RNASeqReadSimulator-master/demo/input/reference.fa RNASeqReadSimulator-master/demo/input/sample.bed RNASeqReadSimulator-master/demo/input/sampleposbias.txt RNASeqReadSimulator-master/demo/input/samplereaderror.txt RNASeqReadSimulator-master/src/ RNASeqReadSimulator-master/src/addvariation2splicingbed.py RNASeqReadSimulator-master/src/genexplvprofile.py RNASeqReadSimulator-master/src/gensimreads.py RNASeqReadSimulator-master/src/getSegs.py RNASeqReadSimulator-master/src/getSegs.pyc RNASeqReadSimulator-master/src/getseqfrombed.py RNASeqReadSimulator-master/src/splitfasta.py creating build/bdist.linux-x86_64/wheel/slamdunk-0.3.4.dist-info/WHEEL error: [Errno 2] No such file or directory: 'build/bdist.linux-x86_64/wheel/slamdunk/contrib/samtools'

ERROR: Failed building wheel for slamdunk Running setup.py clean for slamdunk Failed to build slamdunk Installing collected packages: slamdunk Running setup.py install for slamdunk ... |"

Are there any plans to allow Mac again, or it's too messy?

aleighbrown commented 5 years ago

^ This is with pip install, the conda on our cluster is not really useable at the moment

pip install --prefix="/SAN/vyplab/alb_projects/tools/" slamdunk LOTS OF INSTALL ERRORS and then Failed to build slamdunk Installing collected packages: slamdunk Running setup.py install for slamdunk ... done

slamdunk all -h Traceback (most recent call last): File "/home/annbrown/alb_projects/tools/bin/slamdunk", line 6, in <module> from pkg_resources import load_entry_point File "/share/apps/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3074, in <module> @_call_aside File "/share/apps/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3058, in _call_aside f(*args, **kwargs) File "/share/apps/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3087, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/share/apps/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 664, in _build_master ws.require(__requires__) File "/share/apps/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 981, in require needed = self.resolve(parse_requirements(requirements)) File "/share/apps/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 867, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'slamdunk==0.3.4' distribution was not found and is required by the application

aleighbrown commented 5 years ago

NVM. Got it running on our linux box. Probably worth to mention on the http://t-neumann.github.io/slamdunk/ page that it's not going to run on a Mac. Thank you!

t-neumann commented 5 years ago

Yes I will actually try do fix this in the next builds.

Btw for cluster environments, usually also a good alternative is to simply use the Docker/Singularity containers that should take care of any installation hassles.

aleighbrown commented 5 years ago

If our cluster IT enabled it, we'd be using it.... (: thank you!

On Fri, May 31, 2019, 7:17 AM Tobias Neumann notifications@github.com wrote:

Yes I will actually try do fix this in the next builds.

Btw for cluster environments, usually also a good alternative is to simply use the Docker/Singularity containers that should take care of any installation hassles.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/t-neumann/slamdunk/issues/51?email_source=notifications&email_token=ABWUNNH3LFLNAFOYUUO5XZLPYC7GBA5CNFSM4HQNRK52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWUJ4PY#issuecomment-497589823, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWUNNELLLNE33SULGCO6A3PYC7GBANCNFSM4HQNRK5Q .

drowsygoat commented 5 years ago

Hi, May I ask for any tips how to install SlamDunk on MacOS? I trid to run it as a docker, but it seems to crash (guess due to memory restrictions, see below). I would very much appreciate some tips how to solve the installation problem, or otherwise how to remedy the problem with docker.

[CONFIG] Parameter: --affine 0 --argos_min_score 0 --bam 1 --bin_size 2 --block_multiplier 2 --bs_cutoff 6 --bs_mapping 0 --cpu_threads 8 --dualstrand 1 --fast 0 --fast_pairing 0 --force_rlength_check 0 --format 2 --gap_extend_penalty 5 --gap_read_penalty 20 --gap_ref_penalty 20 --hard_clip 0 --keep_tags 0 --kmer 13 --kmer_min 0 --kmer_skip 2 --local 1 --match_bonus 10 --match_bonus_tc 2 --match_bonus_tt 10 --max_cmrs 2147483647 --max_equal 1 --max_insert_size 1000 --max_polya 4 --max_read_length 0 --min_identity 0.650000 --min_insert_size 0 --min_mq 0 --min_residues 0.500000 --min_score 0.000000 --mismatch_penalty 15 --mode 0 --no_progress 1 --no_unal 0 --ocl_threads 1 --output Tag_SLAM_1/results/map/slam_pilot.fq_BC_RT_1_slamdunk_mapped.bam --overwrite 1 --pair_score_cutoff 0.900000 --paired 0 --parse_all 1 --pe_delimiter / --qry ../slam_dir/Tag_SLAM_1/slam_pilot.fq_BC_RT_1.fq --qry_count -1 --qry_start 0 --ref GRCm38.primary_assembly.genome.fa --ref_mode -1 --rg_id 0 --rg_sm RT1:NA:NA --sensitive 0 --silent_clip 0 --skip_mate_check 0 --skip_save 0 --slam_seq 2 --step_count 4 --strata 1 --topn 100 --trim5 12 --update_check 0 --very_fast 0 --very_sensitive 0 [NGM] Opening for output (BAM): Tag_SLAM_1/results/map/slam_pilot.fq_BC_RT_1_slamdunk_mapped.bam [SEQPROV] Encoding reference sequence. [SEQPROV] Size of reference genome 2730 Mbp (max. 17179 Mbp) [SEQPROV] Allocating 1365469438 (2776387546) bytes for the reference. [SEQPROV] BinRef length: 1365469403ll (elapsed 29.659138) [SEQPROV] 0 reference sequences were skipped (length < 10). [SEQPROV] Writing encoded reference to GRCm38.primary_assembly.genome.fa-enc.2.ngm [SEQPROV] Writing to disk took 5.67s [PREPROCESS] Building reference table [PREPROCESS] Allocated 1 hashtable units (tableLocMax=2^32.000000, genomeSize=2^31.346750) [PREPROCESS] Building RefTable #0 (kmer length: 13, reference skip: 2) [PREPROCESS] Number of k-mers: 67108865 [PREPROCESS] Counting kmers took 63.10s [PREPROCESS] Average number of positions per prefix: 16.281763 [PREPROCESS] Index size: 335544325 byte (67108865 x 5) [PREPROCESS] Generating index took 4.47s Killed

t-neumann commented 5 years ago

Hi @drowsygoat

yes that looks like a memory issue. 2 things you have to do:

  1. Crank up your memory allowance in the Docker.app:

Docker -> Preferences -> Advanced -> Give it like 10 GB

  1. Start up your container with a similar allowance like this:
docker run --cpus 2 -m 8g -v $(pwd):$(pwd) -w $(pwd) tobneu/slamdunk:v0.3.4 slamdunk all -h

Hope that helps.

drowsygoat commented 5 years ago

@t-neumann Thanks a lot, this was extremely helpful, worked smoothly. If I may have one question: in case the bed reference is not provided, the count and filter functions of slamDunk would be applied to all mapped positions instead. Is that correct?

t-neumann commented 5 years ago

@drowsygoat filter works on the raw alignments of reads and is separate from the count function which counts conversion abundances in defined intervals over all reads mapping to those specified intervals. count will not work without a bed file and it is anyways hard to deduce all mapped positions before the actual run.