|
From: Leandro B. <lba...@pa...> - 2012-02-29 11:42:05
|
Thanks guys,
I still have several problems and I must be doing somethings wrong, I'll try to explain what I'm doing and the corresponding outputs here:
1) when opening the samtools executable, on a directory Desktop/SAMTOOLS created for this purpose, it opens a terminal window with the following content:
Last login: Wed Feb 29 11:40:20 on ttys002
chataignier:~ leandro$ /Users/leandro/Desktop/SAMTOOLS/samtools ; exit;
Program: samtools (Tools for alignments in the SAM format)
Version: 0.1.18 (r982:295)
Usage: samtools <command> [options]
Command: view SAM<->BAM conversion
sort sort alignment file
mpileup multi-way pileup
depth compute the depth
faidx index/extract FASTA
tview text alignment viewer
index index alignment
idxstats BAM index stats (r595 or later)
fixmate fix mate information
flagstat simple stats
calmd recalculate MD/NM tags and '=' bases
merge merge sorted alignments
rmdup remove PCR duplicates
reheader replace BAM header
cat concatenate BAMs
targetcut cut fosmid regions (for fosmid pool only)
phase phase heterozygotes
logout
[Process completed]
and it doesn't allow me to enter other requests. So I've opened a new terminal window and since it doesn't recognize the samtools command, I've created a variable $samtools=/Users/leandro/Desktop/SAMTOOLS/samtools which allows me to work with samtools.
2) then I introduce the command I gave you before:
$samtools view -bh ftp://ftp-mouse.sanger.ac.uk/current_bams/PWK_PhJ.bam chr11 > chr11.bam
- always the segmentation fault error;
- so like you suggested, I've tried to use 11 instead of chr11,
it gives:
[bam_index_load] attempting to download the remote index file.
and surprisingly it starts producing a chr11.bam file and a PWK_PhJ.bam.bai --> this step ends when the file is 3.94Gb, contrarily to the 5,3Gb file found by Michael.
However, when I request to visualize the first and last lines of this bam file, this is what I get:
&?]???????ִ??Ԡ?K??
???%?B[~'8OK?c??F??32m?>?4?mq/fDw?O?T5??p¡Oq???? ??3B??nק>U???W?[Uh4
???}i???wyC?
(T??G???i??lr6qIz?b?g?;??????0."ueS??5?KI??St?>
?=#?E??i\W?@5[?V?պ?A??-?|}U?QVti?9ߥ????:?6?j??Z ???]????5H?0p?6lg????t{
57????????~?T??F?????+????}ML?f?MS>>???[?
And I guess this is not what I was supposed to get.
3) When I repeat the same thing but this time without the -b, so:
$samtools view -h ftp://ftp-mouse.sanger.ac.uk/current_bams/PWK_PhJ.bam 11 > chr11.bam , last time it produced a chr11.bam with 13,85Gb and a normal output
HEADER (extract):
@HD VN:1.0 GO:none SO:coordinate
@SQ SN:1 LN:197195432 AS:NCBIM37 UR:file:/lustre/scratch102/projects/mouse/ref/NCBIM37_um M5:f05d753079c455c0e57af88eeda24493
@SQ SN:10 LN:129993255 AS:NCBIM37 UR:file:/lustre/scratch102/projects/mouse/ref/NCBIM37_um M5:be7e6a13cc6b9da7c1da7b7fc32c5506
@SQ SN:11 LN:121843856 AS:NCBIM37 UR:file:/lustre/scratch102/projects/mouse/ref/NCBIM37_um M5:e0099550b3d3943fb9bb7af6fa6952c1
@SQ SN:12 LN:121257530 AS:NCBIM37 UR:file:/lustre/scratch102/projects/mouse/ref/NCBIM37_um M5:1f9c11dc6f288f93e9fab56772a36e85
ALIGNMENT (extract):
IL11_3085:6:20:1669:458 99 11 2999992 30 76M = 3000458542 TCGCCATTACCAAGGTCCTACTTGTATATTTCCCATTTTTCACGTTTTTCACTGTTTCTCGCCATATTCCAAGTCT BBBBBBBBBABBBBB>BB@@@BBB?9?@B@B@@@@@ABA@@@@>=>@@?;9<<:=@=<@@9:;9:74<9887:05< MF:i:130 Aq:i:30 UQ:i:55 H0:i:0 H1:i:0 RG:Z:3085_6 NM:i:14MD:Z:0N0N0N0N0N0N0N0N0N0A0A0G13G6A43
IL34_2814:8:1:857:1789 163 11 2999996 55 54M = 3000152210 CATTACCAAGGTCCTACTTGTATATTTCCCATTTTTCACGTTTTTCACTGTTTC ABBBBBBCBC677B@BBBBBABBABAABBA?BBABBBBBC7@A>@BA@BBBA@B MF:i:130 Aq:i:55 UQ:i:66 H0:i:0 H1:i:0 RG:Z:2814_8 NM:i:10 MD:Z:0N0N0N0N0N0A0A0G13G6A25
4) the output for file 'which samtools' is
which samtools: cannot open `which samtools' (No such file or directory)
Probably these are basic questions and I'm making simple programming errors, but I'd really appreciate if you could suggest some ideas about why this is happening.
Best regards,
Leandro
On 28 févr. 2012, at 10:10, Michael Dondrup wrote:
> Hi,
>
> I also tested this command on Mac OS (but under Lion) and it works for me:
> Darwin Confucius 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
> I would try to do a fresh build, did you see any compiler warnings? What your the output of:
>
> $ samtools
> Version: 0.1.18 (r982:295) […]
> $ file `which samtools`
> /opt/local/bin/samtools: Mach-O 64-bit executable x86_64
>
> What happens if you download that file and then run the command on the local file?
>
> Best
> Michael
>
> On Feb 27, 2012, at 7:46 PM, Brent Pedersen wrote:
>
>> On Mon, Feb 27, 2012 at 10:16 AM, Leandro Batista <lba...@pa...> wrote:
>>> Good Afternoon,
>>>
>>> I am starting to use samtools to perform whole genome sequence analysis in
>>> mouse. Since mouse strain genome bam files are huge, I want to split them by
>>> chromosomal position. Besides, i'm obtaining the genome alignments from FTP.
>>> For this, I introduce the following command:
>>>
>>> $samtools view -bh ftp://ftp-mouse.sanger.ac.uk/current_bams/PWK_PhJ.bam
>>> chr11 > chr11.bam
>>>
>>
>> Try using just "11" instead of chr11.
>>
> no, there is data for chr11 seemingly, the resulting bam file for me is 5.3GB.
>
>>> and it is giving me the following error:
>>> Segmentation fault.
>>>
>>> Another problem I'm having is with defining a specific region inside
>>> chromosome 11. When I try to use the suggested format:
>>> 'chr11:1,000,000-2,000,000' ; it gives another error:
>>>
>>> [bam_parse_region] fail to determine the sequence name.
>>> [main_samview] region "chr11:1,000,000-2,000,000" specifies an unknown
>>> reference name. Continue anyway.
>>>
>>
>> This is the same problem.
>>
>>
>>> Since I'm a beginner in both programming and samtools, I'm having problems
>>> in understanding where the errors come from. Can you help me dealing with
>>> this?
>>>
>>> I'm using a iMac with 4Gb RAM
>>> $ uname -a: Darwin chataignier.gfons.pasteur.fr 10.8.0 Darwin Kernel Version
>>> 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
>>>
>>> I'm running the last version of samtools 0.1.18.
>>>
>>> I really hope you can help me.
>>>
>>> Best Regards
>>> Leandro Batista
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Try before you buy = See our experts in action!
>>> The most comprehensive online learning library for Microsoft developers
>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> http://p.sf.net/sfu/learndevnow-dev2
>>> _______________________________________________
>>> Samtools-help mailing list
>>> Sam...@li...
>>> https://lists.sourceforge.net/lists/listinfo/samtools-help
>>>
>>
>> ------------------------------------------------------------------------------
>> Try before you buy = See our experts in action!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-dev2
>> _______________________________________________
>> Samtools-help mailing list
>> Sam...@li...
>> https://lists.sourceforge.net/lists/listinfo/samtools-help
>
|