Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • #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


    • #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


      • #93
        This should work.

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

        Comment


        • #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


          • #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


            • #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


              • #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


                • #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


                  • #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


                    • 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


                      • 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


                        • 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


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

                            Best Regards
                            Zillur

                            Comment


                            • 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


                              • 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

                                • seqadmin
                                  Strategies for Sequencing Challenging Samples
                                  by seqadmin


                                  Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                                  03-22-2024, 06:39 AM
                                • seqadmin
                                  Techniques and Challenges in Conservation Genomics
                                  by seqadmin



                                  The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                                  Avian Conservation
                                  Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                                  03-08-2024, 10:41 AM

                                ad_right_rmr

                                Collapse

                                News

                                Collapse

                                Topics Statistics Last Post
                                Started by seqadmin, Yesterday, 06:37 PM
                                0 responses
                                10 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, Yesterday, 06:07 PM
                                0 responses
                                9 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 03-22-2024, 10:03 AM
                                0 responses
                                51 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 03-21-2024, 07:32 AM
                                0 responses
                                67 views
                                0 likes
                                Last Post seqadmin  
                                Working...
                                X