SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
SRA to fastq conversion with fastq-dump loses sequences pcantalupo Bioinformatics 13 10-08-2015 04:09 PM
BWA sam and Samtools sam->bam conversion problem maasha Bioinformatics 6 06-05-2013 07:39 AM
fastq to srf conversion? solo Bioinformatics 0 09-01-2010 10:13 AM
fastq to fasta conversion kwtennis311 Bioinformatics 4 06-11-2010 11:06 AM
Reduce file size after Illumina FASTQ to Sanger FASTQ conversion? jjw14 Illumina/Solexa 2 06-01-2010 04:35 PM

Reply
 
Thread Tools
Old 08-07-2014, 06:42 AM   #21
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

commend in terminal:
kurban@kurban-X550VC:~/Downloads/bwa-0.7.10$ bwa mem gene.fa CD_ATGTCA_L007_R1_001.fastq CD_ATGTCA_L007_R1_002.fastq > aln-pe1.sam
and it shows:
[main] unrecognized command 'mem'

is this a problem of bwa version or what? any suggestion would be appreciated.
kurban910 is offline   Reply With Quote
Old 08-07-2014, 07:02 AM   #22
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Probably - which version of bwa are you using? Note your command did NOT run a local copy of bwa in the current folder, but the system default via the $PATH setting.
maubp is offline   Reply With Quote
Old 08-07-2014, 08:40 AM   #23
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

Adding a "./" might fix it, if the bwa executable is in that directory.
./bwa mem gene.fa CD_ATGTCA_L007_R1_001.fastq CD_ATGTCA_L007_R1_002.fastq > aln-pe1.sam
Brian Bushnell is offline   Reply With Quote
Old 08-07-2014, 10:02 AM   #24
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

thank you guys, it seems like a problem of old version bwa. but i have another question:
i have a five pairs of raw reads files all in fastq format as blow:
CD_ATGTCA_L007_R1_001.fastq CD_ATGTCA_L007_R2_004.fastq
CD_ATGTCA_L007_R1_002.fastq CD_ATGTCA_L007_R2_005.fastq
CD_ATGTCA_L007_R1_003.fastq
CD_ATGTCA_L007_R1_004.fastq
CD_ATGTCA_L007_R1_005.fastq
CD_ATGTCA_L007_R2_001.fastq
CD_ATGTCA_L007_R2_002.fastq
CD_ATGTCA_L007_R2_003.fastq

they are the paired end raw reads of the insects we sequenced. if i execute alignment $ bwa mem ref.fa read1.fq read2.fq > aln-pe.sam
i would get five sam files, right? but along the way of SNPs calling should i add these files into one whole file? if i do ,which step should i do that and how?
kurban910 is offline   Reply With Quote
Old 08-07-2014, 10:11 AM   #25
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

If they are all the same library, I would cat them first.
cat CD_ATGTCA_L007_R1_*.fastq > r1.fq
cat CD_ATGTCA_L007_R2_*.fastq > r2.fq

Then map. You could concatenate them after mapping, also, if you strip the headers, but this is simpler.
Brian Bushnell is offline   Reply With Quote
Old 08-07-2014, 10:11 AM   #26
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,053
Default

You should "cat" the R1 and R2 reads together into a single file. Then use that file to do the alignments. Keep the order of the files intact (1 --> 5) as you cat them.
GenoMax is offline   Reply With Quote
Old 08-07-2014, 10:29 AM   #27
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

thank you guys , i really learned a lot. but it's already midnight here,so i would do that first thing in the morning, c u.
kurban910 is offline   Reply With Quote
Old 08-08-2014, 03:25 AM   #28
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

hello!
when i tried to filter SNPs by typing the commend in the terminal:
bcftools view my.var.bcf | vcfutils.pl varFilter - > my.var-final.vcf

it showed this:
open: No such file or directory
vcfutils.pl: command not found

then i found the location of vcfutils.pl :
$ locate vcfutils.pl
/usr/share/samtools/vcfutils.pl

then i typed the commend in terminal:
$ bcftools view my.var.bcf | /usr/share/samtools/vcfutils.pl varFilter - > my.var-final.vcf
it still gives me this:
open: No such file or directory

and i checked the file vcfutils.pl ,it there. i even put the commend like this way:
$ bcftools view my.var.bcf | perl /usr/share/samtools/vcfutils.pl varFilter - > my.var-final.vcf
it still gived me this:
open: No such file or directory

where should i make change in the command line this time?
kurban910 is offline   Reply With Quote
Old 08-08-2014, 03:45 AM   #29
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,053
Default

Is the bcftools executable in the directory you are currently in? Have you tried to "locate" it and provide the full path for it like you did for vcfutils.pl?

Is your my.var.bcf file in the current directory?

In future, start a new thread when you have a new question.
GenoMax is offline   Reply With Quote
Old 08-08-2014, 03:49 AM   #30
blakeoft
Member
 
Location: Connecticut

Join Date: Oct 2013
Posts: 79
Default

kurban910, are you sure that you have the right name for the bcf file? It looks to me like the command is correct.
blakeoft is offline   Reply With Quote
Old 08-08-2014, 04:18 AM   #31
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

Quote:
Originally Posted by GenoMax View Post
Is the bcftools executable in the directory you are currently in? Have you tried to "locate" it and provide the full path for it like you did for vcfutils.pl?

Is your my.var.bcf file in the current directory?

In future, start a new thread when you have a new question.
1. bcftools is executable in my current directory.

kurban@kurban-X550VC:~/Desktop/SNPs/CD$ bcftools

Program: bcftools (Tools for data in the VCF/BCF formats)
Version: 0.1.17-dev (r973:277)

Usage: bcftools <command> <arguments>

Command: view print, extract, convert and call SNPs from BCF
index index BCF
cat concatenate BCFs
ld compute all-pair r^2
ldpair compute r^2 between requested pairs


2.i have tried to provide full path of bcftools:
kurban@kurban-X550VC:~/Desktop/SNPs/CD$ /usr/bin/bcftools view my.var.bcf | /usr/share/samtools/vcfutils.pl varFilter - > my.var-final.vcf
it says:
open: No such file or directory
and file my.var.bcf is in my current diractory.

but it is still not working.
kurban910 is offline   Reply With Quote
Old 08-08-2014, 04:27 AM   #32
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,053
Default

Are you sure bcftools in in your current directory (~/Desktop/SNPs/CD from what I can see above)? You seem to be running the copy that is in /usr/bin (in the set of commands in #2).

Have you verified that my.var.bcf file is non-zero bytes (i.e. there is something in it)?

Can you use [ CODE] (remove the leading space before CODE) put your commands here [/CODE] to make the commands you are pasting clear (enclose them in CODE tags on both sides like I have shown). Otherwise it is difficult to decipher if there are spaces in wrong spot in your command line.

Last edited by GenoMax; 08-08-2014 at 04:31 AM.
GenoMax is offline   Reply With Quote
Old 08-08-2014, 04:27 AM   #33
blakeoft
Member
 
Location: Connecticut

Join Date: Oct 2013
Posts: 79
Default

kurban910, I just ran
Code:
bcftools view jim.bcf
and I don't have any file called jim.bcf. It gave me this:
Code:
open: No such file or directory
This makes me think that you have the wrong name. Be careful with 1's and l's, -'s and _'s, etc -- it's easy to get these confused. Heck, I even get .'s and _'s confused sometimes. In the directory that the bcf file is located, can you execute:
Code:
ls $PWD/*.bcf
and copy the bcf file's name exactly as it appears, including the full path, and then try running your command again?
blakeoft is offline   Reply With Quote
Old 08-08-2014, 04:37 AM   #34
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

Quote:
Originally Posted by blakeoft View Post
kurban910, are you sure that you have the right name for the bcf file? It looks to me like the command is correct.
yes, i am sure the file name is right
kurban910 is offline   Reply With Quote
Old 08-08-2014, 04:44 AM   #35
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

Quote:
Originally Posted by GenoMax View Post
Are you sure bcftools in in your current directory (~/Desktop/SNPs/CD from what I can see above)? You seem to be running the copy that is in /usr/bin (in the set of commands in #2).

Have you verified that my.var.bcf file is non-zero bytes (i.e. there is something in it)?

Can you use [ CODE] (remove the leading space before CODE) put your commands here [/CODE] to make the commands you are pasting clear (enclose them in CODE tags on both sides like I have shown). Otherwise it is difficult to decipher if there are spaces in wrong spot in your command line.
u r right ,thanks. i will put the commends in the code box next time. and yes, my.var.bcf file is around 7.6 BM.

and for your first question, bcftools is not in the current directory i am in, but its executable from here.
kurban910 is offline   Reply With Quote
Old 08-08-2014, 05:28 AM   #36
kurban910
Member
 
Location: urumqi

Join Date: Jul 2014
Posts: 58
Default

Quote:
Originally Posted by blakeoft View Post
kurban910, I just ran
Code:
bcftools view jim.bcf
and I don't have any file called jim.bcf. It gave me this:
Code:
open: No such file or directory
This makes me think that you have the wrong name. Be careful with 1's and l's, -'s and _'s, etc -- it's easy to get these confused. Heck, I even get .'s and _'s confused sometimes. In the directory that the bcf file is located, can you execute:
Code:
ls $PWD/*.bcf
and copy the bcf file's name exactly as it appears, including the full path, and then try running your command again?
thank you for your time guys , now i find out not just this one, other commends also r not exacted in my terminal , ubuntu 12.04 some times isnít stable . after i reinstall the system i will try again.
kurban910 is offline   Reply With Quote
Old 09-18-2015, 07:04 AM   #37
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Quote:
Originally Posted by maubp View Post
If you did want to convert the FASTQ to an unaligned SAM or BAM file, try this:
http://picard.sourceforge.net/comman...tml#FastqToSam
I need to do this locally, and since we didn't have Picard installed but do have Biopython (yes, I'm biased ), I wrote a simple Python script to convert paired FASTQ files into unmapped SAM reads (which you can pipe into samtools to get as a BAM file):

https://github.com/peterjc/picobio/b...astq_to_sam.py

I would expect this to be slower than a dedicated tool, so probably not suitable for a high throughput pipeline - but it should be fine for a one-off analysis.
maubp is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 05:39 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO