Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • AnushaC
    Member
    • Sep 2013
    • 78

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

    Comment

    • AnushaC
      Member
      • Sep 2013
      • 78

      #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

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #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

        • swbarnes2
          Senior Member
          • May 2008
          • 910

          #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

          • AnushaC
            Member
            • Sep 2013
            • 78

            #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

            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM
            • SEQadmin2
              Cancer Drug Resistance: The Lingering Barrier to Rising Survival
              by SEQadmin2



              Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

              There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
              07-08-2026, 05:17 AM
            • GATTACAT
              Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
              by GATTACAT
              Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
              07-01-2026, 11:43 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 07-13-2026, 10:26 AM
            0 responses
            18 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-09-2026, 10:04 AM
            0 responses
            30 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-08-2026, 10:08 AM
            0 responses
            16 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-07-2026, 11:05 AM
            0 responses
            34 views
            0 reactions
            Last Post SEQadmin2  
            Working...