SEQanswers

Go Back   SEQanswers > Applications Forums > RNA Sequencing



Similar Threads
Thread Thread Starter Forum Replies Last Post
path error for samtools-1.2 after re-install cmccabe Bioinformatics 2 09-15-2015 10:20 AM
Samtools Segmentation error while using samtools index AnushaC Bioinformatics 3 06-18-2014 07:01 AM
where to copy samtools binary to some directories alittleboy Bioinformatics 1 02-27-2013 11:17 PM
how to place samtools in "PATH" for use with TopHat on MAC louis7781x Bioinformatics 15 12-16-2012 07:31 PM
QC using Samtools fongchun Bioinformatics 0 11-12-2011 12:35 PM

Reply
 
Thread Tools
Old 05-23-2017, 04:23 AM   #1
atonidas
Member
 
Location: Korea

Join Date: May 2017
Posts: 15
Default cannot copy samtools-0.1.19/samtools to PATH

I am installing Samtools and I got this message:

Code:
$ tar jxvf samtools-0.1.19.tar.bz2
$ cd samtools-0.1.19
$ make
$ cd
$ cp samtools-0.1.19/samtools $HOME/bin
cp: cannot stat `samtools-0.1.19/samtools': No such file or directory
I checked in the /samtools-0.1.19/ directory but there are nothing like "samtools" file but "samtools.1".

I am using msys on window, would you mind giving me some advices?

Thank you so much
atonidas is offline   Reply With Quote
Old 05-23-2017, 04:26 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,435
Default

Do NOT use samtools-0.0.19 at this time. It is ancient (in NGS age) and deprecated.

Unless you must use it for some old software. Even then keep/use the latest version.
GenoMax is offline   Reply With Quote
Old 05-23-2017, 04:39 AM   #3
atonidas
Member
 
Location: Korea

Join Date: May 2017
Posts: 15
Default

Quote:
Originally Posted by GenoMax View Post
Do NOT use samtools-0.0.19 at this time. It is ancient (in NGS age) and deprecated.

Unless you must use it for some old software. Even then keep/use the latest version.
I already tried with the latest version of "samtools" which is "samtools-1.4.1" but I still got that message
atonidas is offline   Reply With Quote
Old 05-23-2017, 05:10 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,435
Default

Are you getting an error when compiling samtools?
GenoMax is offline   Reply With Quote
Old 05-23-2017, 06:06 AM   #5
atonidas
Member
 
Location: Korea

Join Date: May 2017
Posts: 15
Default

Quote:
Originally Posted by GenoMax View Post
Are you getting an error when compiling samtools?
Do you mean that do I got any error when running make command for samtools?
atonidas is offline   Reply With Quote
Old 05-23-2017, 06:12 AM   #6
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,435
Default

That is correct.
GenoMax is offline   Reply With Quote
Old 05-23-2017, 06:19 AM   #7
atonidas
Member
 
Location: Korea

Join Date: May 2017
Posts: 15
Default

Quote:
Originally Posted by GenoMax View Post
That is correct.
I think I got this error :
Code:
bam_split.c:34:19: fatal error: regex.h: No such file or directory
 #include <regex.h>
                   ^
compilation terminated.
make: *** [bam_split.o] Error 1
here whole compiling process :
Code:
$ make
Makefile:103: config.mk: No such file or directory
config.mk:34: htslib-1.4.1/htslib_static.mk: No such file or directory
cd htslib-1.4.1 && make htslib.pc.tmp
make[1]: Entering directory `/c/RNA-seq-packages/samtools-1.4.1/htslib-1.4.1'
sed -e '/^static_libs=/s/@[email protected]/-lz -lm -lbz2 -llzma/;s#@[^-][^@]*@##g' htslib.pc.in > htslib.pc.tmp
make[1]: Leaving directory `/c/RNA-seq-packages/samtools-1.4.1/htslib-1.4.1'
cd htslib-1.4.1 && make htslib_static.mk
make[1]: Entering directory `/c/RNA-seq-packages/samtools-1.4.1/htslib-1.4.1'
sed -n '/^static_libs=/s/[^=]*=/HTSLIB_static_LIBS = /p;/^static_ldflags=/s/[^=]*=/HTSLIB_static_LDFLAGS = /p' htslib.pc.tmp > htslib_static.mk
make[1]: Leaving directory `/c/RNA-seq-packages/samtools-1.4.1/htslib-1.4.1'
echo '/* Basic config.h generated by Makefile */' > config.h
echo '#define HAVE_CURSES' >> config.h
echo '#define HAVE_CURSES_H' >> config.h
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_index.o bam_index.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_plcmd.o bam_plcmd.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o sam_view.o sam_view.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_cat.o bam_cat.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_md.o bam_md.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_reheader.o bam_reheader.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_sort.o bam_sort.c
bam_sort.c: In function 'ks_shuffle_heap':
bam_sort.c:130:1: warning: implicit declaration of function 'drand48' [-Wimplicit-function-declaration]
 KSORT_INIT(heap, heap1_t, heap_lt)
 ^
bam_sort.c: In function 'gen_unique_id':
bam_sort.c:341:9: warning: implicit declaration of function 'lrand48' [-Wimplicit-function-declaration]
         ksprintf(dest, "%s-%0lX", prefix, lrand48());
         ^
bam_sort.c:341:9: warning: format '%lX' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat=]
bam_sort.c: In function 'bam_merge':
bam_sort.c:1529:5: warning: implicit declaration of function 'srand48' [-Wimplicit-function-declaration]
     srand48(random_seed);
     ^
bam_sort.c: In function 'complain_about_memory_setting':
bam_sort.c:1898:13: warning: unknown conversion type character 'z' in format [-Wformat=]
             max_mem, suffix, SORT_MIN_MEGS_PER_THREAD);
             ^
bam_sort.c:1898:13: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'size_t' [-Wformat=]
bam_sort.c:1898:13: warning: unknown conversion type character 'z' in format [-Wformat=]
bam_sort.c:1898:13: warning: too many arguments for format [-Wformat-extra-args]
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bedidx.o bedidx.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_rmdup.o bam_rmdup.c
bam_rmdup.c: In function 'bam_rmdup_core':
bam_rmdup.c:157:21: warning: unknown conversion type character 'l' in format [-Wformat=]
                     fprintf(stderr, "[bam_rmdup_core] %llu unmatched pairs\n", (long long)kh_size(del_set));
                     ^
bam_rmdup.c:157:21: warning: too many arguments for format [-Wformat-extra-args]
bam_rmdup.c:216:21: warning: unknown conversion type character 'l' in format [-Wformat=]
                     (long long)q->n_checked, (double)q->n_removed/q->n_checked, kh_key(aux, k));
                     ^
bam_rmdup.c:216:21: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_rmdup.c:216:21: warning: format '%lf' expects argument of type 'double', but argument 3 has type 'long long int' [-Wformat=]
bam_rmdup.c:216:21: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'long long int' [-Wformat=]
bam_rmdup.c:216:21: warning: too many arguments for format [-Wformat-extra-args]
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_rmdupse.o bam_rmdupse.c
bam_rmdupse.c: In function 'bam_rmdupse_core':
bam_rmdupse.c:199:21: warning: unknown conversion type character 'l' in format [-Wformat=]
                     (long long)q->n_checked, (double)q->n_removed/q->n_checked, kh_key(aux, k));
                     ^
bam_rmdupse.c:199:21: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_rmdupse.c:199:21: warning: format '%lf' expects argument of type 'double', but argument 3 has type 'long long int' [-Wformat=]
bam_rmdupse.c:199:21: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'long long int' [-Wformat=]
bam_rmdupse.c:199:21: warning: too many arguments for format [-Wformat-extra-args]
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_mate.o bam_mate.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_stat.o bam_stat.c
bam_stat.c: In function 'bam_flagstat':
bam_stat.c:159:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld in total (QC-passed reads + QC-failed reads)\n", s->n_reads[0], s->n_reads[1]);
     ^
bam_stat.c:159:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:159:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:160:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld secondary\n", s->n_secondary[0], s->n_secondary[1]);
     ^
bam_stat.c:160:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:160:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:161:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld supplementary\n", s->n_supp[0], s->n_supp[1]);
     ^
bam_stat.c:161:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:161:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:162:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld duplicates\n", s->n_dup[0], s->n_dup[1]);
     ^
bam_stat.c:162:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:162:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:163:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld mapped (%s : %s)\n", s->n_mapped[0], s->n_mapped[1], percent(b0, s->n_mapped[0], s->n_reads[0]), percent(b1, s->n_mapped[1], s->n_reads[1]));
     ^
bam_stat.c:163:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:163:5: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'long long int' [-Wformat=]
bam_stat.c:163:5: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'long long int' [-Wformat=]
bam_stat.c:163:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:164:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld paired in sequencing\n", s->n_pair_all[0], s->n_pair_all[1]);
     ^
bam_stat.c:164:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:164:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:165:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld read1\n", s->n_read1[0], s->n_read1[1]);
     ^
bam_stat.c:165:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:165:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:166:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld read2\n", s->n_read2[0], s->n_read2[1]);
     ^
bam_stat.c:166:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:166:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:167:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld properly paired (%s : %s)\n", s->n_pair_good[0], s->n_pair_good[1], percent(b0, s->n_pair_good[0], s->n_pair_all[0]), percent(b1, s->n_pair_good[1], s->n_pair_all[1]));
     ^
bam_stat.c:167:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:167:5: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'long long int' [-Wformat=]
bam_stat.c:167:5: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'long long int' [-Wformat=]
bam_stat.c:167:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:168:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld with itself and mate mapped\n", s->n_pair_map[0], s->n_pair_map[1]);
     ^
bam_stat.c:168:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:168:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:169:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld singletons (%s : %s)\n", s->n_sgltn[0], s->n_sgltn[1], percent(b0, s->n_sgltn[0], s->n_pair_all[0]), percent(b1, s->n_sgltn[1], s->n_pair_all[1]));
     ^
bam_stat.c:169:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:169:5: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'long long int' [-Wformat=]
bam_stat.c:169:5: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'long long int' [-Wformat=]
bam_stat.c:169:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:170:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld with mate mapped to a different chr\n", s->n_diffchr[0], s->n_diffchr[1]);
     ^
bam_stat.c:170:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:170:5: warning: too many arguments for format [-Wformat-extra-args]
bam_stat.c:171:5: warning: unknown conversion type character 'l' in format [-Wformat=]
     printf("%lld + %lld with mate mapped to a different chr (mapQ>=5)\n", s->n_diffhigh[0], s->n_diffhigh[1]);
     ^
bam_stat.c:171:5: warning: unknown conversion type character 'l' in format [-Wformat=]
bam_stat.c:171:5: warning: too many arguments for format [-Wformat-extra-args]
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_color.o bam_color.c
echo '#define SAMTOOLS_VERSION "1.4.1"' > version.h
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bamtk.o bamtk.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam2bcf.o bam2bcf.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam2bcf_indel.o bam2bcf_indel.c
bam2bcf_indel.c: In function 'ks_shuffle_uint32_t':
bam2bcf_indel.c:38:1: warning: implicit declaration of function 'drand48' [-Wimplicit-function-declaration]
 KSORT_INIT_GENERIC(uint32_t)
 ^
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o sample.o sample.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o cut_target.o cut_target.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o phase.o phase.c
phase.c: In function 'ks_shuffle_rseq':
phase.c:84:1: warning: implicit declaration of function 'drand48' [-Wimplicit-function-declaration]
 KSORT_INIT(rseq, frag_p, rseq_lt)
 ^
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam2depth.o bam2depth.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o padding.o padding.c
padding.c: In function 'bam_pad2unpad':
padding.c:218:17: warning: unknown conversion type character 'l' in format [-Wformat=]
                 fprintf(stderr, "[depad] ERROR: (Padded) length of '%s' is %u in BAM header, but %llu in embedded reference\n", bam_get_qname(b), h->target_len[r_tid], (unsigned long long)(r.l));
                 ^
padding.c:218:17: warning: too many arguments for format [-Wformat-extra-args]
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bedcov.o bedcov.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bamshuf.o bamshuf.c
bamshuf.c: In function 'ks_shuffle_bamshuf':
bamshuf.c:78:1: warning: implicit declaration of function 'drand48' [-Wimplicit-function-declaration]
 KSORT_INIT(bamshuf, elem_t, elem_lt)
 ^
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o faidx.o faidx.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o dict.o dict.c
dict.c: In function 'write_dict':
dict.c:85:13: warning: implicit declaration of function 'realpath' [-Wimplicit-function-declaration]
             char *real_path = realpath(fn, NULL);
             ^
dict.c:85:31: warning: initialization makes pointer from integer without a cast
             char *real_path = realpath(fn, NULL);
                               ^
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o stats.o stats.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o stats_isize.o stats_isize.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_flags.o bam_flags.c
gcc -g -Wall -O2 -I. -Ihtslib-1.4.1  -c -o bam_split.o bam_split.c
bam_split.c:34:19: fatal error: regex.h: No such file or directory
 #include <regex.h>
                   ^
compilation terminated.
make: *** [bam_split.o] Error 1
atonidas is offline   Reply With Quote
Old 05-23-2017, 06:24 AM   #8
atonidas
Member
 
Location: Korea

Join Date: May 2017
Posts: 15
Default

Quote:
Originally Posted by GenoMax View Post
That is correct.
I think I got this error :
Code:
bam_split.c:34:19: fatal error: regex.h: No such file or directory
 #include <regex.h>
                   ^
compilation terminated.
make: *** [bam_split.o] Error 1
Attached file is the whole compiling process.
Attached Files
File Type: txt samtools.txt (12.7 KB, 0 views)
atonidas is offline   Reply With Quote
Old 05-23-2017, 06:45 AM   #9
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,435
Default

Since you are getting an error the program has not actually compiled.

Are you using linux shell on Windows 10 or a cygwin/VM environment?
GenoMax is offline   Reply With Quote
Old 05-23-2017, 06:47 AM   #10
atonidas
Member
 
Location: Korea

Join Date: May 2017
Posts: 15
Default

Quote:
Originally Posted by GenoMax View Post
Since you are getting an error the program has not actually compiled.

Are you using linux shell on Windows 10 or a cygwin/VM environment?
I am using minGW/msys on win10
atonidas is offline   Reply With Quote
Old 05-23-2017, 07:05 AM   #11
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,435
Default

Install the regex.h for MinGW from here (probably in /usr/include).
GenoMax is offline   Reply With Quote
Old 05-24-2017, 10:01 PM   #12
atonidas
Member
 
Location: Korea

Join Date: May 2017
Posts: 15
Default

Quote:
Originally Posted by GenoMax View Post
Install the regex.h for MinGW from here (probably in /usr/include).
I have just installed linux and I could install samtools without any problem anymore, thank you so much for your help.
atonidas is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 08:01 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO