Closed Hulanyue closed 4 years ago
Can you do a which samtools
and just samtools
, and send me the results?
I don't know if that's what you mean. linux@linux-virtual-machine:~/samtools$ which samtools linux@linux-virtual-machine:~/samtools$ samtools
Program: samtools (Tools for alignments in the SAM format) Version: 1.9 (using htslib 1.9)
Usage: samtools
Commands: -- Indexing dict create a sequence dictionary file faidx index/extract FASTA fqidx index/extract FASTQ index index alignment
-- Editing calmd recalculate MD/NM tags and '=' bases fixmate fix mate information reheader replace BAM header targetcut cut fosmid regions (for fosmid pool only) addreplacerg adds or replaces RG tags markdup mark duplicates
-- File operations collate shuffle and group alignments by name cat concatenate BAMs merge merge sorted alignments mpileup multi-way pileup sort sort alignment file split splits a file by read group quickcheck quickly check if SAM/BAM/CRAM file appears intact fastq converts a BAM to a FASTQ fasta converts a BAM to a FASTA
-- Statistics bedcov read depth per BED region depth compute the depth flagstat simple stats idxstats BAM index stats phase phase heterozygotes stats generate stats (former bamcheck)
-- Viewing flags explain BAM flags tview text alignment viewer view SAM<->BAM<->CRAM conversion depad convert padded BAM to unpadded BAM
Yes, that's it. Just wanted to confirm the samtools version (1.9). And which
returned nothing, which means samtools is not on your PATH
, i.e. other programs like proovread cannot find it. Not sure what the problem exactly is.
Just FYI, the problem with the install permission has to do with the path you specified. You put /home/samtools/...
but it probably needs to be /home/YOURUSERNAME/samtools
. However, I don't think this is necessarily related to the issue at hand, since samtools apparently is already installed...
To get proovread to work you need to figure out where on your system samtools got installed, and then add that path to your PATH variable. Only programs/commands in a directory listed in $PATH
can be used by other programs. See for example here for more info: https://www.techrepublic.com/article/how-to-add-directories-to-your-path-in-linux/
I seem to understand what you mean! I'll try setting the path again tomorrow!
Good night ,thackl!
Thanks,thackl!
I try to be /home/Linux/samtools/.... and run make install
, It doesn't have any effect and still 'permission denied'.
when I run samtools view
,it show me sudo apt install samtools
,then I install samtools and add the $PATH variable,It is OK when I run make sample
.
Glad it works now!
Hi! when I install samtools-1.9,I have a permission problem!
linux@linux-virtual-machine:~/samtools/samtools-1.9$ make install mkdir -p -m 755 /home/samtools/samtools-1.9/bin /home/samtools/samtools-1.9/bin /home/samtools/samtools-1.9/share/man/man1 mkdir: cannot create directory ‘/home/samtools’: Permission denied mkdir: cannot create directory ‘/home/samtools’: Permission denied mkdir: cannot create directory ‘/home/samtools’: Permission denied make: *** [Makefile:302: install] Error 1
But when I run
samtools view
,it is normal .linux@linux-virtual-machine:~/samtools/samtools-1.9$ samtools view Usage: samtools view [options]|| [region ...]
Options:
-b output BAM
-C output CRAM (requires -T)
-1 use fast BAM compression (implies -b)
-u uncompressed BAM output (implies -b)
-h include header in SAM output
-H print SAM header only (no alignments)
-c print only the count of matching records
-o FILE output file name [stdout]
-U FILE output reads not selected by filters to FILE [null]
-t FILE FILE listing reference names and lengths (see long help) [null]
-L FILE only include reads overlapping this BED FILE [null]
-r STR only include reads in read group STR [null]
-R FILE only include reads with read group listed in FILE [null]
-q INT only include reads with mapping quality >= INT [0]
-l STR only include reads in library STR [null]
-m INT only include reads with number of CIGAR operations consuming
query sequence >= INT [0]
-f INT only include reads with all of the FLAGs in INT present [0]
-F INT only include reads with none of the FLAGS in INT present [0]
-G INT only EXCLUDE reads with all of the FLAGs in INT present [0]
-s FLOAT subsample reads (given INT.FRAC option value, 0.FRAC is the
fraction of templates/read pairs to keep; INT part sets seed)
-M use the multi-region iterator (increases the speed, removes
duplicates and outputs the reads as they are ordered in the file)
-x STR read tag to strip (repeatable) [null]
-B collapse the backward CIGAR operation
-? print long help, including note about region specification
-S ignored (input format is auto-detected)
--input-fmt-option OPT[=VAL]
Specify a single input file format option in the form
of OPTION or OPTION=VALUE
-O, --output-fmt FORMAT[,OPT[=VAL]]...
Specify output format (SAM, BAM, CRAM)
--output-fmt-option OPT[=VAL]
Specify a single output file format option in the form
of OPTION or OPTION=VALUE
-T, --reference FILE
Reference sequence FASTA FILE [null]
-@, --threads INT
Number of additional threads to use [0]
However,when I run 'make sample',there is a problem
linux@linux-virtual-machine:~/proovread$ make sample bin/proovread --sample --pre sample-results -o --threads 1 [Sun Sep 29 21:56:21 2019] Running proovread-2.14.1 under Perl 5.28.1 [Sun Sep 29 21:56:21 2019] Reading core config [Sun Sep 29 21:56:21 2019] Reading command line options [Sun Sep 29 21:56:21 2019] Logging parameter to
sample-results/sample-results.p arameter.log
[Sun Sep 29 21:56:21 2019] Checking short read filesF.antasticus_short.fq Detected FASTQ format Estimated short read length: 100 +-0 Estimating approximate number of short reads: 50.0k
[Sun Sep 29 21:56:21 2019] Checking required binaries
Can't exec "samtools": No such file or directory at bin/proovread line 2067.
------------------------------------------------------------------------------
[Sun Sep 29 21:56:21 2019] Couldn't determine version of samtools, at least 1.1 required Exited at 'main' 'bin/proovread', line 2068 Last call 'main::check_binary' 'bin/proovread', line 666 make: *** [Makefile:32: sample] Error 255
How can I solve this problem? Thank you very much ,thackl !!