Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #91
    The command line you are using refers to the older version of bcftools (v.0.1.19). The -b option is deprecated in new bcftools (v.1.1), which you are using.

    I have not tested the following command line. See if it works for you.

    Code:
    $ samtools mpileup -uf /example/reference/lambda_virus.fa eg2.sorted.bam | bcftools view -O u -v -c 5 -g hom - > eg2.raw.bcf
    PS: If you type

    Code:
    $ bcftools view
    Then that should print the help for the bcftools view command. You can then choose the appropriate command line options for various parameters.

    Comment

    • zillur
      Senior Member
      • Sep 2014
      • 106

      #92
      Thank you very much.

      Mds-MacBook-Pro:reference ZILLURRAHMAN$ ls
      commands lambda_virus.3.bt2 lambdaout.4.bt2
      eg2.bam lambda_virus.4.bt2 lambdaout.rev.1.bt2
      eg2.raw.bcf lambda_virus.fa lambdaout.rev.2.bt2
      eg2.sam lambda_virus.rev.1.bt2 nohup.out
      eg2.sorted.bam lambda_virus.rev.2.bt2 out
      egl.sam lambdaout.1.bt2 out.sam
      lambda_virus.1.bt2 lambdaout.2.bt2
      lambda_virus.2.bt2 lambdaout.3.bt2
      Mds-MacBook-Pro:reference ZILLURRAHMAN$ samtools mpileup -uf /example/reference/lambda_virus.fa eg2.sorted.bam | bcftools view -O u -v -c 5 -g hom - > eg2.raw.bcf
      [fai_load] build FASTA index.
      [fai_build] fail to open the FASTA file /example/reference/lambda_virus.fa
      [fai_load] fail to open FASTA index.
      [E::hts_open] fail to open file '5'
      Failed to open or the file not indexed: 5
      Mds-MacBook-Pro:reference ZILLURRAHMAN$

      Which thing I am missing?

      Best Regards
      Zillur

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #93
        This should work.

        Code:
        $ samtools mpileup -uf /example/reference/lambda_virus.fa eg2.sorted.bam | bcftools view -O u  - > eg2.raw.bcf

        Comment

        • zillur
          Senior Member
          • Sep 2014
          • 106

          #94
          Thank you very much for your patience.

          Mds-MacBook-Pro:reference ZILLURRAHMAN$ samtools mpileup -uf /example/reference/lambda_virus.fa eg2.sorted.bam | bcftools view -O u - > eg2.raw.bcf
          [fai_load] build FASTA index.
          [fai_build] fail to open the FASTA file /example/reference/lambda_virus.fa
          [fai_load] fail to open FASTA index.
          [vcf.c:1224 vcf_hdr_read] Could not read the header
          Failed to open or the file not indexed: -
          Mds-MacBook-Pro:reference ZILLURRAHMAN$ ls
          commands lambda_virus.3.bt2 lambdaout.4.bt2
          eg2.bam lambda_virus.4.bt2 lambdaout.rev.1.bt2
          eg2.raw.bcf lambda_virus.fa lambdaout.rev.2.bt2
          eg2.sam lambda_virus.rev.1.bt2 nohup.out
          eg2.sorted.bam lambda_virus.rev.2.bt2 out
          egl.sam lambdaout.1.bt2 out.sam
          lambda_virus.1.bt2 lambdaout.2.bt2
          lambda_virus.2.bt2 lambdaout.3.bt2
          Mds-MacBook-Pro:reference ZILLURRAHMAN$

          May be I am missing some points.

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #95
            The command should be (I was going off what you had in your prior post)
            Code:
            $ samtools mpileup -uf $BT2_HOME/example/reference/lambda_virus.fa eg2.sorted.bam | bcftools view -O u - > eg2.raw.bcf

            Comment

            • zillur
              Senior Member
              • Sep 2014
              • 106

              #96
              Thank you very much. I think its working now.
              But what does it mean?


              Mds-MacBook-Pro:reference ZILLURRAHMAN$ samtools mpileup -uf lambda_virus.fa eg2.sorted.bam | bcftools view -O u - > eg2.raw.bcf
              [fai_load] build FASTA index.
              [mpileup] 1 samples in 1 input files
              <mpileup> Set max per-file depth to 8000
              Mds-MacBook-Pro:reference ZILLURRAHMAN$ ls
              commands lambda_virus.3.bt2 lambdaout.3.bt2
              eg2.bam lambda_virus.4.bt2 lambdaout.4.bt2
              eg2.raw.bcf lambda_virus.fa lambdaout.rev.1.bt2
              eg2.sam lambda_virus.fa.fai lambdaout.rev.2.bt2
              eg2.sorted.bam lambda_virus.rev.1.bt2 nohup.out
              egl.sam lambda_virus.rev.2.bt2 out
              lambda_virus.1.bt2 lambdaout.1.bt2 out.sam
              lambda_virus.2.bt2 lambdaout.2.bt2
              Mds-MacBook-Pro:reference ZILLURRAHMAN$ more lambda_virus.fa.fai
              gi|9626243|ref|NC_001416.1| 48502 74 70 71
              Mds-MacBook-Pro:reference ZILLURRAHMAN$ head lambda_virus.fa.fai
              gi|9626243|ref|NC_001416.1| 48502 74 70 71
              Mds-MacBook-Pro:reference ZILLURRAHMAN$

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #97
                What it means is you just used a data file containing alignments against lambda virus and used that to call SNP's (bcftools part). Last command will let you look at the SNP's called.

                Code:
                $ bcftools view eg2.raw.bcf

                Comment

                • zillur
                  Senior Member
                  • Sep 2014
                  • 106

                  #98
                  Thank you very much. Now I got large data like:

                  gi|9626243|ref|NC_001416.1| 48491 . C <X> 0 . DP=6;I16=0,3,0,0,84,2570,0,0,87,3537,0,0,25,625,0,0;QS=1,0;MQ0F=0 PL 0,9,47
                  gi|9626243|ref|NC_001416.1| 48492 . G <X> 0 . DP=4;I16=0,3,0,0,73,1801,0,0,87,3537,0,0,29,635,0,0;QS=1,0;MQ0F=0 PL 0,9,42
                  gi|9626243|ref|NC_001416.1| 48493 . A <X> 0 . DP=4;I16=0,3,0,0,72,1910,0,0,87,3537,0,0,31,661,0,0;QS=1,0;MQ0F=0 PL 0,9,50
                  gi|9626243|ref|NC_001416.1| 48494 . C <X> 0 . DP=3;I16=0,3,0,0,80,2194,0,0,87,3537,0,0,31,651,0,0;QS=1,0;MQ0F=0 PL 0,9,45
                  gi|9626243|ref|NC_001416.1| 48495 . A <X> 0 . DP=3;I16=0,2,0,0,43,1037,0,0,45,1773,0,0,25,625,0,0;QS=1,0;MQ0F=0 PL 0,6,16
                  gi|9626243|ref|NC_001416.1| 48496 . G <X> 0 . DP=2;I16=0,2,0,0,65,2125,0,0,45,1773,0,0,28,634,0,0;QS=1,0;MQ0F=0 PL 0,6,37
                  gi|9626243|ref|NC_001416.1| 48497 . G <X> 0 . DP=2;I16=0,1,0,0,27,729,0,0,3,9,0,0,25,625,0,0;QS=1,0;MQ0F=0 PL 0,3,4
                  gi|9626243|ref|NC_001416.1| 48498 . T <X> 0 . DP=2;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0
                  gi|9626243|ref|NC_001416.1| 48499 . T <X> 0 . DP=2;I16=0,1,0,0,33,1089,0,0,42,1764,0,0,0,0,0,0;QS=1,0;MQ0F=0 PL 0,3,33
                  gi|9626243|ref|NC_001416.1| 48500 . A <X> 0 . DP=1;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0
                  gi|9626243|ref|NC_001416.1| 48501 . C <X> 0 . DP=1;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0
                  gi|9626243|ref|NC_001416.1| 48502 . G <X> 0 . DP=1;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0

                  so many of this. How can I interpret this data?

                  Best Regards
                  Zillur

                  Comment

                  • zillur
                    Senior Member
                    • Sep 2014
                    • 106

                    #99
                    [QUOTE=GenoMax;153671]This is a simple work around.

                    Since you are having trouble editing .bash_profile file put the PATH command in a text file (let us call the file "set_path_file") using an editor. Then when you open a new terminal do the following

                    Code:
                    $ source set_path_file
                    Thank you very much. Using an editor I created a text file where I set the path for bowtie2, smalls, bcftools. Then in a new terminal session I typed "$ source path command.txt" it seems working and direct me to the parent directory. But commands are not found.

                    Mds-MacBook-Pro:~ ZILLURRAHMAN$ type bowtie
                    -bash: type: bowtie: not found

                    I have attached the file so that you can guess my mistakes.

                    Best Regards
                    Zillur
                    Attached Files

                    Comment

                    • GenoMax
                      Senior Member
                      • Feb 2008
                      • 7142

                      #100
                      You need to stop at the level of the directory (not include the actual executable). We are letting the system know that the file(s) I am looking for are in this directory path.

                      Modified file attached.
                      Attached Files

                      Comment

                      • zillur
                        Senior Member
                        • Sep 2014
                        • 106

                        #101
                        Thank you very much. Its working now.
                        another issue, using $ bcftools view eg2.raw.bcf I have got a large data containing like these:

                        gi|9626243|ref|NC_001416.1| 48496 . G <X> 0 . DP=2;I16=0,2,0,0,65,2125,0,0,45,1773,0,0,28,634,0,0;QS=1,0;MQ0F=0 PL 0,6,37
                        gi|9626243|ref|NC_001416.1| 48497 . G <X> 0 . DP=2;I16=0,1,0,0,27,729,0,0,3,9,0,0,25,625,0,0;QS=1,0;MQ0F=0 PL 0,3,4
                        gi|9626243|ref|NC_001416.1| 48498 . T <X> 0 . DP=2;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0
                        gi|9626243|ref|NC_001416.1| 48499 . T <X> 0 . DP=2;I16=0,1,0,0,33,1089,0,0,42,1764,0,0,0,0,0,0;QS=1,0;MQ0F=0 PL 0,3,33
                        gi|9626243|ref|NC_001416.1| 48500 . A <X> 0 . DP=1;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0
                        gi|9626243|ref|NC_001416.1| 48501 . C <X> 0 . DP=1;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0
                        gi|9626243|ref|NC_001416.1| 48502 . G <X> 0 . DP=1;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0,0;MQ0F=0 PL 0,0,0

                        so many of this. How can I interpret this data?

                        Best Regards
                        Zillur

                        Comment

                        • GenoMax
                          Senior Member
                          • Feb 2008
                          • 7142

                          #102
                          That file is in VCF v.4.2 format. You can find the details about the format here: http://samtools.github.io/hts-specs/VCFv4.2.pdf

                          Comment

                          • zillur
                            Senior Member
                            • Sep 2014
                            • 106

                            #103
                            Thank you very much. I am working on it. I will inform you about my progresses. Thank you again.

                            Best Regards
                            Zillur

                            Comment

                            • zillur
                              Senior Member
                              • Sep 2014
                              • 106

                              #104
                              Now I have to measure the quality of the data that we generated as vcc format. Would you please to give me some suggestions by which I can measure the quality of the data.

                              Best Regards
                              Zillur

                              Comment

                              • GenoMax
                                Senior Member
                                • Feb 2008
                                • 7142

                                #105
                                Originally posted by zillur View Post
                                Now I have to measure the quality of the data that we generated as vcc format. Would you please to give me some suggestions by which I can measure the quality of the data.

                                Best Regards
                                Zillur
                                Since this question is no longer associated with the subject of this thread you should post it as a separate question (after due diligence of searching SeqAnswers.com for prior postings).

                                To start a new thread: http://seqanswers.com/forums/showpos...69&postcount=9

                                Comment

                                Latest Articles

                                Collapse

                                • SEQadmin2
                                  Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                                  by SEQadmin2



                                  Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                                  Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                                  ...
                                  Yesterday, 09:55 AM
                                • SEQadmin2
                                  New Genomics Technologies Take Aim at Long-Standing Limits
                                  by SEQadmin2


                                  Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                                  We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                                  ...
                                  09-28-2026, 10:25 AM

                                ad_right_rmr

                                Collapse

                                News

                                Collapse

                                Topics Statistics Last Post
                                Started by SEQadmin2, Yesterday, 05:39 AM
                                0 responses
                                12 views
                                0 reactions
                                Last Post SEQadmin2  
                                Started by SEQadmin2, 10-13-2026, 09:56 AM
                                0 responses
                                14 views
                                0 reactions
                                Last Post SEQadmin2  
                                Started by SEQadmin2, 10-09-2026, 11:14 AM
                                0 responses
                                27 views
                                0 reactions
                                Last Post SEQadmin2  
                                Started by SEQadmin2, 09-29-2026, 09:51 AM
                                0 responses
                                78 views
                                0 reactions
                                Last Post SEQadmin2  
                                Working...