Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • #16
    sorry i mean
    fastq-dump -Z $1 | bowtie -v 3 -k 2 --sam $2 -|samtools faidx $2 -| samtools view -u -t -$3

    Comment


    • #17
      No it is not working for me . It is saying fail to build fasta index . it is coming like this


      anusha@cn1:/raid/development/anusha/python_test/shelltest> ./SRAtoBAM.copy.sh /raid/development/anusha/python_test/shelltest/SRR203400.sra /raid/references-and-indexes/hg19/bowtie-indexes/hg19 /raid/development/anusha/python_test/shelltest/SRR203400.bam
      view: invalid option -- '/'

      Usage: samtools view [options] <in.bam>|<in.sam> [region1 [...]]

      Options: -b output BAM
      -h print header for the SAM output
      -H print header only (no alignments)
      -S input is SAM
      -u uncompressed BAM output (force -b)
      -1 fast compression (force -b)
      -x output FLAG in HEX (samtools-C specific)
      -X output FLAG in string (samtools-C specific)
      -c print only the count of matching records
      -L FILE output alignments overlapping the input BED FILE [null]
      -t FILE list of reference names and lengths (force -S) [null]
      -T FILE reference sequence file (force -S) [null]
      -o FILE output file name [stdout]
      -R FILE list of read groups to be outputted [null]
      -f INT required flag, 0 for unset [0]
      -F INT filtering flag, 0 for unset [0]
      -q INT minimum mapping quality [0]
      -l STR only output reads in library STR [null]
      -r STR only output reads in read group STR [null]
      -s FLOAT fraction of templates to subsample; integer part as seed [-1]
      -? longer help

      Notes:

      1. By default, this command assumes the file on the command line is in
      the BAM format and it prints the alignments in SAM. If `-t' is
      applied, the input file is assumed to be in the SAM format. The
      file supplied with `-t' is SPACE/TAB delimited with the first two
      fields of each line consisting of the reference name and the
      corresponding sequence length. The `.fai' file generated by `faidx'
      can be used here. This file may be empty if reads are unaligned.

      2. SAM->BAM conversion: `samtools view -bT ref.fa in.sam.gz'.

      3. BAM->SAM conversion: `samtools view in.bam'.

      4. A region should be presented in one of the following formats:
      `chr1', `chr2:1,000' and `chr3:1000-2,000'. When a region is
      specified, the input alignment file must be an indexed BAM file.

      5. Option `-u' is preferred over `-b' when the output is piped to
      another samtools command.

      Comment


      • #18
        Originally posted by AnushaC View Post
        sorry i mean
        fastq-dump -Z $1 | bowtie -v 3 -k 2 --sam $2 -|samtools faidx $2 -| samtools view -u -t -$3
        -t is used if you have a SAM file without a header, which isn't the case here. Also -u is mostly useful if you're then piping the output of samtools to something else that expects BAM as input. What you want is something like:

        Code:
        fastq-dump -Z $1 | bowtie -v 3 -k 2 --sam $2 - | samtools view -bS -o $3 -

        Comment


        • #19
          Forget the shell script for a moment. Can you get these commands to work by just typing them one at a time into the command line? You need to figure that out first, before you go stringing commands you don't understand into each other.

          Comment


          • #20
            Hi swbarness ,
            these commands all working meaning my fastq dump ,bow tie and samtools view all i checked on command line . now i have a pipeline for converting single sam to bam file . Now i have 8 of those kind of file each in different subdirectory and in a directory now i want to iterate over each sam file . Hope u understood what i am saying .


            Thanks,
            Anusha.Ch

            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
            11 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, Yesterday, 06:07 PM
            0 responses
            10 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
            68 views
            0 likes
            Last Post seqadmin  
            Working...
            X