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
              Advancing Precision Medicine for Rare Diseases in Children
              by seqadmin




              Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
              12-16-2024, 07:57 AM
            • seqadmin
              Recent Advances in Sequencing Technologies
              by seqadmin



              Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

              Long-Read Sequencing
              Long-read sequencing has seen remarkable advancements,...
              12-02-2024, 01:49 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 12-17-2024, 10:28 AM
            0 responses
            33 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-13-2024, 08:24 AM
            0 responses
            49 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-12-2024, 07:41 AM
            0 responses
            34 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-11-2024, 07:45 AM
            0 responses
            46 views
            0 likes
            Last Post seqadmin  
            Working...
            X