Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SAMTools compilation using Cygwin

    Hi all,

    I am trying to get samtools so that I can sort and index bam files generated with galaxy and view them in IGV.
    I am running on Windows 7 x64. I have installed Git Bash (version 1.8.3-preview20130601), downloaded samtools (Beta Release 0.1.19) using the command line "git clone git://github.com/samtools/samtools.git" and this produced a folder named "samtools" in C:\Users\Myname:

    Cloning into 'samtools'...
    remote: Counting objects: 4230, done.
    remote: Compressing objects: 100% (2092/2092), done.
    rRemote: Total 4230 (delta 2477), reused 3856 (delta 2133)eceiving objects: 99%
    Receiving objects: 100% (4230/4230), 3.50 MiB | 414.00 KiB/s, done.

    Resolving deltas: 100% (2477/2477), done.
    I then tried to compile samtools using Cygwin (v1.7.24) using the command "make". Cygwin does a few things, gives the message "compilation terminated" and then lists a few errors:

    Makefile:31: recipe for target `bam_tview_curses.o' failed
    make[1]: *** [bam_tview_curses.o] Error 1
    make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools'
    Makefile:34: recipe for target `all-recur' failed
    make: *** [all-recur] Error 1

    Finally, if I try to use samtools to sort a bam file (I copied the bam file into the samtools folder and typed "sort Ac7vandAcSat01.bam" and I get this:

    $ sort Ac7vandAcSat01.bam
    sort: string comparison failed: Invalid or incomplete multibyte or wide character
    sort: Set LC_ALL='C' to work around the problem.
    sort: The strings compared were `o\210x\273ˆK\352\227ީD\371\204\211%\322TվЄ\\\342\366\245\332\034R\337H\312\360WR\f\210\236\306\377F\343e\005N\261\037ʛr\372Z\274\355\213x^\233\f\340\226M\355\251_\270I\2040*e\b\265]$9\221W\207\340\322\344\f\257\307\377V\361y\222\264\204\367\016F\022\342\377\206\2241|\306Y\324D\230\326\006ς\2328\314\016\034⟱\313\365\345f\02300V\262q\266v`\234G\251\265\3372h\206\352\tL\376n\354T6\277ik2\263\336C\030\307\017ҤuA\027\320\310\030¤J\262\270\300\315Ym\240\255H\376\245c\373\265\263\361\035\346\257/vk\327\331\326\304\336\272v@\354\235\001\241\346.EsϜ\301xmvr2\205\266`\271\240MO!<\334\316\003U\031n\270\203\273\342\2065L\241\032\355\343\213\312\a\351\276~y\363\300\324/\003#hQ\345I\006\305\347' and `*l\035@\367*\271\273ಮ\235\200\271.q\355\213I=ٮ\317\3523\307\335\356\204\317\346P\304PS\252\b\352A\177㝒S\352y\270̀\266\211\016\347\211\031N\321 \225\035S\300\322\033\203\234\253Mx6 \301\377\017\303t\305E\350\034\0\0\037\213\b\004\0\0\0\0\0\377\006\0BC\002\0\033\0\003\0\0\0\0\0\0\0\0\0'.
    Also, commands like tview or index are not recognized (-bash: tview: command not found; -bash: index: command not found).

    All in all, I do not think I have installed or compiled samtools properly.

    Do you see any obvious mistakes that I have made during installation and compilation of samtools?

    In advance, thank you for your help,

    Oxalis

  • #2
    Can you post a fuller copy of the errors you received when you tried to compile samtools? It clearly looks like you have not been successful in samtools compilation.

    When you eventually get around to sorting the bam file the command works more like this

    Code:
    $ samtools sort your_bam_file.bam bam_file_sorted

    Comment


    • #3
      SAMTools compilation using Cygwin

      Hi,

      Thanks for the answer and sorry for my late reply. I have been trying to compile samtools again (using a newly installed cygwin) by following the advice on this thread: http://seqanswers.com/forums/showthread.php?t=7391

      I have had no error message:

      Code:
      Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
      $ make clean
      make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools'
      rm -fr gmon.out *.o a.out *.exe *.dSYM razip bgzip samtools *~ *.a *.so.* *.so *.dylib
      make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools'
      make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
      rm -fr gmon.out *.o a.out *.dSYM bcftools *~ *.a bcf.aux bcf.log bcf.pdf *.class libbcf.*.dylib libbcf.so*
      make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
      make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/misc'
      rm -fr gmon.out *.o a.out *.exe *.dSYM md5sum-lite md5fa maq2sam-short maq2sam-long ace2sam wgsim bamcheck *~ *.a
      make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/misc'
      
      Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
      $ make
      make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools'
      make[2]: Entering directory `/cygdrive/c/Users/Agathe/samtools'
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -DBGZF_CACHE -I. bgzf.c -o bgzf.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. kstring.c -o kstring.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_aux.c -o bam_aux.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam.c -o bam.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_import.c -o bam_import.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sam.c -o sam.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_index.c -o bam_index.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_pileup.c -o bam_pileup.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_lpileup.c -o bam_lpileup.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_md.c -o bam_md.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. razf.c -o razf.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. faidx.c -o faidx.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bedidx.c -o bedidx.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. knetfile.c -o knetfile.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_sort.c -o bam_sort.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sam_header.c -o sam_header.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_reheader.c -o bam_reheader.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. kprobaln.c -o kprobaln.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_cat.c -o bam_cat.o
      ar -csru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o        bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o bedidx.o  knetfile.o bam_sort.o sam_header.o bam_reheader.o kprobaln.o bam_cat.o
      make[2]: Leaving directory `/cygdrive/c/Users/Agathe/samtools'
      make[2]: Entering directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. bcf.c -o bcf.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. vcf.c -o vcf.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. bcfutils.c -o bcfutils.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. prob1.c -o prob1.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. em.c -o em.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. kfunc.c -o kfunc.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. kmin.c -o kmin.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. index.c -o index.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. fet.c -o fet.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. mut.c -o mut.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. bcf2qcall.c -o bcf2qcall.o
      ar -csru libbcf.a bcf.o vcf.o bcfutils.o prob1.o em.o kfunc.o kmin.o index.o fet.o mut.o bcf2qcall.o
      make[2]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
      make[2]: Entering directory `/cygdrive/c/Users/Agathe/samtools/misc'
      make[2]: Nothing to be done for `lib'.
      make[2]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/misc'
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_tview.c -o bam_tview.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_plcmd.c -o bam_plcmd.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sam_view.c -o sam_view.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_rmdup.c -o bam_rmdup.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_rmdupse.c -o bam_rmdupse.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_mate.c -o bam_mate.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_stat.c -o bam_stat.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_color.c -o bam_color.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bamtk.c -o bamtk.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. kaln.c -o kaln.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam2bcf.c -o bam2bcf.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam2bcf_indel.c -o bam2bcf_indel.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. errmod.c -o errmod.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sample.c -o sample.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. cut_target.c -o cut_target.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. phase.c -o phase.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam2depth.c -o bam2depth.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. padding.c -o padding.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bedcov.c -o bedcov.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bamshuf.c -o bamshuf.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_tview_curses.c -o bam_tview_curses.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_tview_html.c -o bam_tview_html.o
      gcc -I/usr/include/ncurses -o samtools bam_tview.o bam_plcmd.o sam_view.o  bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o  bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o  cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o  bam_tview_curses.o bam_tview_html.o  libbam.a -Lbcftools -lbcf  -lcurses  -lm -lz -lpthread
      make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools'
      make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. call1.c -o call1.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. main.c -o main.o
      gcc -I/usr/include/ncurses -o bcftools call1.o main.o ../kstring.o ../bgzf.o ../knetfile.o ../bedidx.o -L.  -lbcf -lm -lz -lpthread
      make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
      make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/misc'
      gcc -c -I/usr/include/ncurses -DMD5SUM_MAIN -o md5sum-lite.o md5.c
      gcc -I/usr/include/ncurses -o md5sum-lite md5sum-lite.o
      gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. md5.c -o md5.o
      gcc -I/usr/include/ncurses -c -I.. -o md5fa.o md5fa.c
      gcc -I/usr/include/ncurses -o md5fa md5.o md5fa.o -lz
      gcc -I/usr/include/ncurses -o maq2sam-short maq2sam.c -lz
      gcc -I/usr/include/ncurses -DMAQ_LONGREADS -o maq2sam-long maq2sam.c -lz
      gcc -I/usr/include/ncurses -c -I.. -o ace2sam.o ace2sam.c
      gcc -I/usr/include/ncurses -o ace2sam ace2sam.o -lz
      gcc -I/usr/include/ncurses -c -I.. -o wgsim.o wgsim.c
      gcc -I/usr/include/ncurses -o wgsim wgsim.o -lm -lz
      gcc -I/usr/include/ncurses -c -I.. -o bamcheck.o bamcheck.c
      gcc -I/usr/include/ncurses -o bamcheck bamcheck.o -L.. -lm -lbam -lpthread -lz
      make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/misc'
      However, it seems that I still cannot use samtools (or am I typing wrong commands?).

      When I do the right command for "sort" as GenoMax suggested:
      $ samtools sort your_bam_file.bam bam_file_sorted
      I get:
      Code:
      $ samtools sort Ac7v_and_AcSat01.bam Ac7v_and_AcSat01_sorted
      -bash: samtools: command not found
      If I take out "samtools", I get:
      Code:
      $ sort Ac7v_and_AcSat01.bam Ac7v_and_AcSat01_sorted
      sort: stat failed: Ac7v_and_AcSat01_sorted: No such file or directory
      And only if I take out the name of the sorted bam file, I get:
      Code:
      $ sort Ac7v_and_AcSat01.bam
      sort: string comparison failed: Invalid or incomplete multibyte or wide character
      sort: Set LC_ALL='C' to work around the problem.
      sort: The strings compared were `o\210x\273ˆK\352\227ީD\371\204\211%\322TվЄ\\\342\366\245\332\034R\337H\312\360WR\f\210\236\306\377F\343e\005N\261\037ʛr\372Z\274\355\213x^\233\f\340\226M\355\251_\270I\2040*e\b\265]$9\221W\207\340\322\344\f\257\307\377V\361y\222\264\204\367\016F\022\342\377\206\2241|\306Y\324D\230\326\006ς\2328\314\016\034⟱\313\365\345f\02300V\262q\266v`\234G\251\265\3372h\206\352\tL\376n\354T6\277ik2\263\336C\030\307\017ҤuA\027\320\310\030¤J\262\270\300\315Ym\240\255H\376\245c\373\265\263\361\035\346\257/vk\327\331\326\304\336\272v@\354\235\001\241\346.EsϜ\301xmvr2\205\266`\271\240MO!<\334\316\003U\031n\270\203\273\342\2065L\241\032\355\343\213\312\a\351\276~y\363\300\324/\003#hQ\345I\006\305\347' and `*l\035@\367*\271\273ಮ\235\200\271.q\355\213I=ٮ\317\3523\307\335\356\204\317\346P\304PS\252\b\352A\177㝒S\352y\270̀\266\211\016\347\211\031N\321 \225\035S\300\322\033\203\234\253Mx6 \301\377\017\303t\305E\350\034\0\0\037\213\b\004\0\0\0\0\0\377\006\0BC\002\0\033\0\003\0\0\0\0\0\0\0\0\0'.
      Does anyone of you know what is causing this?

      Again, thanks for your help!
      Last edited by Oxalis; 08-20-2013, 12:06 PM.

      Comment


      • #4
        It seems like you were able to complete the compilation of samtools.

        If your "samtools" executable is in the /cygdrive/c/Users/Agathe/samtools directory try running the command as follows (assuming that you are currently in the directory with the bam file)

        Code:
        $ /cygdrive/c/Users/Agathe/samtools sort Ac7v_and_AcSat01.bam Ac7v_and_AcSat01_sorted
        If the samtools program is in a directory other than (/cygdrive/c/Users/Agathe/) then substitute that path.

        Comment


        • #5
          Walkthrough installation of samtools in Windows

          Hi again,

          I have finally made it work! Sorry I posted this thread but it was so difficult because I did not find a unique place with the steps to follow for the download, compilation, installation and usage of samtools. All the information was spread out on the internet.

          So I would like to give the steps I followed from beginning to end for future users and beginners in bioinformatics:

          Downloading Samtools via Github
          Your first time with git and github
          If you’ve never used git or github before, there are a bunch of things that you need to do. It’s very well explained on github, but repeated here for completeness.
          • Get a github account.
          • Download and install git.
          • Set up git with your user name and email.
          o Open a terminal/shell and type:
          Code:
          $ git config --global user.name "Your name here" 
          $ git config --global user.email "[email protected]"
          • Set up ssh on your computer. I like Roger Peng’s guide to setting up password-less logins. Also see github’s guide to generating SSH keys.

          Pasted from <http://kbroman.github.io/github_tutorial/pages/first_time.html>

          Step 1: Check for SSH keys
          First, we need to check for existing ssh keys on your computer. Open up Git Bash and run:
          Code:
          cd ~/.ssh
          ls
          # Lists the files in your .ssh directory
          Check the directory listing to see if you have a file named either id_rsa.pub or id_dsa.pub. If you don't have either of those files go to step 2. Otherwise, you already have an existing keypair, and you can skip to step 3.

          Step 2: Generate a new SSH key
          To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
          Code:
          ssh-keygen -t rsa -C "[email protected]"
          # Creates a new ssh key, using the provided email as a label
          # Generating public/private rsa key pair.
          # Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press enter]
          Now you need to enter a passphrase.

          Why do passphrases matter?
          Passwords aren't very secure, you already know this. If you use one that's easy to remember, it's easier to guess or brute-force (try many options until one works). If you use one that's random it's hard to remember, and thus you're more inclined to write the password down. Both of these are Very Bad Things™. This is why you're using ssh keys.
          But using a key without a passphrase is basically the same as writing down that random password in a file on your computer. Anyone who gains access to your drive has gained access to every system you use that key with. This is also a Very Bad Thing™. The solution is obvious: add a passphrase.
          But I don't want to enter a long passphrase every time I use the key!
          Neither do we! Thankfully, there's a nifty little tool called ssh-agent that can save your passphrase securely so you don't have to re-enter it. Unfortunately, it takes a little work to get it up and running on Windows.
          For more information about SSH key passphrases, check out our help guide.

          Code:
          # Enter passphrase (empty for no passphrase): [Type a passphrase]
          # Enter same passphrase again: [Type passphrase again]
          Which should give you something like this:
          Code:
          # Your identification has been saved in /c/Users/you/.ssh/id_rsa.
          # Your public key has been saved in /c/Users/you/.ssh/id_rsa.pub.
          # The key fingerprint is:
          # 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email][email protected][/email]
          Pasted from <https://help.github.com/articles/generating-ssh-keys>


          Step 3: Add your SSH key to GitHub

          Pasted from <https://help.github.com/articles/generating-ssh-keys>

          (To copy created key to clipboard):

          $ cat ~/.ssh/id_rsa.pub >/dev/clipboard

          Pasted from <http://superuser.com/questions/600409/sh-exe-clip-command-not-found>

          • Go to your Account Settings
          • Click "SSH Keys" in the left sidebar
          • Click "Add SSH key"
          • Paste your key into the "Key" field
          • Click "Add key"
          • Confirm the action by entering your GitHub password

          Pasted from <https://help.github.com/articles/generating-ssh-keys>
          To make sure everything is working you'll now SSH to GitHub. When you do this, you will be asked to authenticate this action using your password, which for this purpose is the passphrase you created earlier. Don't change the [email protected] part. That's supposed to be there.

          Code:
          ssh -T [email][email protected][/email]
          # Attempts to ssh to github
          You may see this warning:
          Code:
          # The authenticity of host 'github.com (207.97.227.239)' can't be established.
          # RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
          # Are you sure you want to continue connecting (yes/no)?
          Don't worry, this is supposed to happen. Verify that the fingerprint matches the one here and type "yes".

          Code:
          # Hi username! You've successfully authenticated, but GitHub does not
          # provide shell access.
          If that username is correct, you've successfully set up your SSH key. Don't worry about the shell access thing, you don't want that anyway.

          Pasted from <https://help.github.com/articles/generating-ssh-keys>
          Getting SAMTools via Github

          Type in Git Bash (command line):

          Code:
          Agathe@AGATHE-TOSH ~
           
          $ git clone git://github.com/samtools/samtools.git
           
          Cloning into 'samtools'...
          remote: Counting objects: 4230, done.
          remote: Compressing objects: 100% (2092/2092), done.
          remote: Total 4230 (delta 2477), reused 3856 (delta 2133)R
          Receiving objects: 100% (4230/4230), 3.50 MiB | 1.45 MiB/s, done.
          Resolving deltas: 100% (2477/2477), done.
          (This created a folder called "samtools" in C:\Users\Agathe)
          Compiling SAMTools using Cygwin

          Change the beginning of the Makefile and Makefile (MINGW) into:

          Code:
          CC= gcc
          CFLAGS= -g -Wall -O2 #-m64 #-arch ppc
          CFLAGS= -I/usr/include/ncurses
          DFLAGS= -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log
          KNETFILE_O= knetfile.o
          Pasted from <http://seqanswers.com/forums/showthread.php?t=7391>


          And use make in Cygwin (after the command "make clean" to make sure no previous compilation is messing up things):

          Code:
          Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
          $ make clean
          make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools'
          rm -fr gmon.out *.o a.out *.exe *.dSYM razip bgzip samtools *~ *.a *.so.* *.so *.dylib
          make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools'
          make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
          rm -fr gmon.out *.o a.out *.dSYM bcftools *~ *.a bcf.aux bcf.log bcf.pdf *.class libbcf.*.dylib libbcf.so*
          make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
          make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/misc'
          rm -fr gmon.out *.o a.out *.exe *.dSYM md5sum-lite md5fa maq2sam-short maq2sam-long ace2sam wgsim bamcheck *~ *.a
          make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/misc'
          Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
          Code:
          $ make
          make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools'
          make[2]: Entering directory `/cygdrive/c/Users/Agathe/samtools'
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -DBGZF_CACHE -I. bgzf.c -o bgzf.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. kstring.c -o kstring.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_aux.c -o bam_aux.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam.c -o bam.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_import.c -o bam_import.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sam.c -o sam.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_index.c -o bam_index.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_pileup.c -o bam_pileup.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_lpileup.c -o bam_lpileup.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_md.c -o bam_md.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. razf.c -o razf.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. faidx.c -o faidx.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bedidx.c -o bedidx.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. knetfile.c -o knetfile.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_sort.c -o bam_sort.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sam_header.c -o sam_header.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_reheader.c -o bam_reheader.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. kprobaln.c -o kprobaln.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_cat.c -o bam_cat.o
          ar -csru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o        bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o bedidx.o  knetfile.o bam_sort.o sam_header.o bam_reheader.o kprobaln.o bam_cat.o
          make[2]: Leaving directory `/cygdrive/c/Users/Agathe/samtools'
          make[2]: Entering directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. bcf.c -o bcf.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. vcf.c -o vcf.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. bcfutils.c -o bcfutils.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. prob1.c -o prob1.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. em.c -o em.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. kfunc.c -o kfunc.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. kmin.c -o kmin.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. index.c -o index.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. fet.c -o fet.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. mut.c -o mut.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. bcf2qcall.c -o bcf2qcall.o
          ar -csru libbcf.a bcf.o vcf.o bcfutils.o prob1.o em.o kfunc.o kmin.o index.o fet.o mut.o bcf2qcall.o
          make[2]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
          make[2]: Entering directory `/cygdrive/c/Users/Agathe/samtools/misc'
          make[2]: Nothing to be done for `lib'.
          make[2]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/misc'
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_tview.c -o bam_tview.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_plcmd.c -o bam_plcmd.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sam_view.c -o sam_view.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_rmdup.c -o bam_rmdup.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_rmdupse.c -o bam_rmdupse.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_mate.c -o bam_mate.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_stat.c -o bam_stat.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_color.c -o bam_color.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bamtk.c -o bamtk.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. kaln.c -o kaln.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam2bcf.c -o bam2bcf.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam2bcf_indel.c -o bam2bcf_indel.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. errmod.c -o errmod.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. sample.c -o sample.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. cut_target.c -o cut_target.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. phase.c -o phase.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam2depth.c -o bam2depth.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. padding.c -o padding.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bedcov.c -o bedcov.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bamshuf.c -o bamshuf.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_tview_curses.c -o bam_tview_curses.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. bam_tview_html.c -o bam_tview_html.o
          gcc -I/usr/include/ncurses -o samtools bam_tview.o bam_plcmd.o sam_view.o  bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o  bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o  cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o  bam_tview_curses.o bam_tview_html.o  libbam.a -Lbcftools -lbcf  -lcurses  -lm -lz -lpthread
          make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools'
          make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. call1.c -o call1.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I.. -I. main.c -o main.o
          gcc -I/usr/include/ncurses -o bcftools call1.o main.o ../kstring.o ../bgzf.o ../knetfile.o ../bedidx.o -L.  -lbcf -lm -lz -lpthread
          make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/bcftools'
          make[1]: Entering directory `/cygdrive/c/Users/Agathe/samtools/misc'
          gcc -c -I/usr/include/ncurses -DMD5SUM_MAIN -o md5sum-lite.o md5.c
          gcc -I/usr/include/ncurses -o md5sum-lite md5sum-lite.o
          gcc -c -I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1 -Dexpl=exp -Dlogl=log -I. md5.c -o md5.o
          gcc -I/usr/include/ncurses -c -I.. -o md5fa.o md5fa.c
          gcc -I/usr/include/ncurses -o md5fa md5.o md5fa.o -lz
          gcc -I/usr/include/ncurses -o maq2sam-short maq2sam.c -lz
          gcc -I/usr/include/ncurses -DMAQ_LONGREADS -o maq2sam-long maq2sam.c -lz
          gcc -I/usr/include/ncurses -c -I.. -o ace2sam.o ace2sam.c
          gcc -I/usr/include/ncurses -o ace2sam ace2sam.o -lz
          gcc -I/usr/include/ncurses -c -I.. -o wgsim.o wgsim.c
          gcc -I/usr/include/ncurses -o wgsim wgsim.o -lm -lz
          gcc -I/usr/include/ncurses -c -I.. -o bamcheck.o bamcheck.c
          gcc -I/usr/include/ncurses -o bamcheck bamcheck.o -L.. -lm -lbam -lpthread -lz
          make[1]: Leaving directory `/cygdrive/c/Users/Agathe/samtools/misc'
          Pasted from <http://seqanswers.com/forums/showthread.php?t=32918>
          Exporting SAMTools into the PATH variable: (So that your computer knows where to look for the commands, use the path which leads to the folder where samtools has been compiled):

          Code:
          Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
          $ export PATH=$PATH:/cygdrive/c/Users/Agathe/samtools
          Checking that samtools is found in the right folder:
          Code:
          Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
          $ which samtools
          /cygdrive/c/Users/Agathe/samtools/samtools
          Samtools has been installed (version 0.1.19+) with all commands:
          Code:
          Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
          $ samtools.exe
          3
          Program: samtools (Tools for alignments in the SAM format)
          Version: 0.1.19+
           
          Usage:   samtools <command> [options]
           
          Command: view        SAM<->BAM conversion
                   sort        sort alignment file
                   mpileup     multi-way pileup
                   depth       compute the depth
                   faidx       index/extract FASTA
                   tview       text alignment viewer
                   index       index alignment
                   idxstats    BAM index stats (r595 or later)
                   fixmate     fix mate information
                   flagstat    simple stats
                   calmd       recalculate MD/NM tags and '=' bases
                   merge       merge sorted alignments
                   rmdup       remove PCR duplicates
                   reheader    replace BAM header
                   cat         concatenate BAMs
                   bedcov      read depth per BED region
                   targetcut   cut fosmid regions (for fosmid pool only)
                   phase       phase heterozygotes
                   bamshuf     shuffle and group alignments by name

          Sorting:

          Code:
          Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
          $ samtools sort Ac7v_and_AcSat01.bam Ac7v_and_AcSat01_sorted
          (This created a sorted bam file called Ac7v_and_AcSat01_sorted.bam)

          Indexing:

          Code:
          Agathe@Agathe-TOSH /cygdrive/c/Users/Agathe/samtools
          $ samtools index Ac7v_and_AcSat01_sorted.bam
          (This created a bai file)
          Last edited by Oxalis; 08-21-2013, 05:55 AM.

          Comment


          • #6
            Thanks Oxalis, this is exactly what this newbie was looking for!

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Recent Advances in Sequencing Analysis Tools
              by seqadmin


              The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
              05-06-2024, 07:48 AM
            • seqadmin
              Essential Discoveries and Tools in Epitranscriptomics
              by seqadmin




              The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
              04-22-2024, 07:01 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 05-10-2024, 06:35 AM
            0 responses
            16 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 05-09-2024, 02:46 PM
            0 responses
            21 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 05-07-2024, 06:57 AM
            0 responses
            19 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 05-06-2024, 07:17 AM
            0 responses
            21 views
            0 likes
            Last Post seqadmin  
            Working...
            X