Question: Region "Awk" Specifies An Unknown Reference Name
0
gravatar for Zhshqzyc
7.7 years ago by
Zhshqzyc490
Zhshqzyc490 wrote:

Hello, can you look at what is wrong by using samtools command?

#!bin/bash
samtools view  -o raw_genome.txt my.bam awk '{print $3, $4, $10;}' \
raw_genome.txt >raw_sequence.txt

What I got is

[main_samview] region "awk" specifies an unknown reference name. Continue anyway.

[mainsamview] region "{print $3, $4, $10;}" specifies an unknown reference name. Continue anyway. [mainsamview] region "raw_genome.txt" specifies an unknown reference name. Continue anyway.

Thanks

samtools • 1.8k views
ADD COMMENTlink modified 7.7 years ago by Pasta1.3k • written 7.7 years ago by Zhshqzyc490
3
gravatar for Pasta
7.7 years ago by
Pasta1.3k
Switzerland
Pasta1.3k wrote:

Add a pipe "|" and remove the -o option and do something like that:

samtools view my.bam | awk '{print $3, $4, $10;}' > Raw_File.txt

The pipe will redirect the output of your first command to the next command

ADD COMMENTlink written 7.7 years ago by Pasta1.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1309 users visited in the last hour